#!/usr/bin/perl # Perl festival_client by darxus@op.net # Released under the GNU General Public License # Code based on speechd (http://SpeechIO.undef.net) # 778 Mon Aug 09 23:31:43 EDT 1999 #includes libs for TCP socket connection to Festival use IO::Socket; # create a tcp connection to the festival server print "Attempting to connect to Festival server.\n"; if ($handle = IO::Socket::INET->new(Proto => "tcp", PeerAddr => "localhost", PeerPort => "1314")) { print "Successfully connected to Festival server. Type something and hit ENTER.\n"; print $handle "(SayText \"Successfully connected to Festival server. Type something and hit ENTER.\")\n"; } else { die "Failed to connect to Festival server ($!). Are you sure it's running ?\n"; } while ($text = ) { print $handle "(SayText \"$text\")" or die "Could not write to Festival ($!).\n"; }