Script (test.cgi):package Voice; use IO::Socket; sub new { shift; my $self = {}; bless($self); return $self; } # end-new sub talk { $handle = IO::Socket::INET->new(Proto => "tcp", PeerAdr => "localhost", PeerPort => 1314) || die($!); print $handle "(SayText \"Testing.\")" || die($!); } # end-talk 1;
When I run test.cgi through a web browser I get nothing (even if the festival server is not running). When I run it from the command line, I get "broken pipe" regardless of whether the festival server is running or not.#!/usr/bin/perl use CGI qw(:header); print header; use Voice; my $voice = new Voice; $voice->talk; exit;
Being a newbie at perl modules my guess is that I've done something wrong in writing the module but I really dont know.#!/usr/bin/perl use IO::Socket; $handle = IO::Socket::INET->new(Proto => "tcp", PeerAddr => "localhost", PeerPort => 1314) || die($!); print $handle "(SayText \"Testing.\")"; exit;
In reply to Re^2: Festival Module
by rsiedl
in thread Broken Pipe error when talking to Festival server
by rsiedl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |