http://qs321.pair.com?node_id=181558


in reply to Text-to-speech in Perl

Not sure how you get a list of voices programmatically but here is an old script I dug up.
#/usr/bin/perl -w use strict; use Win32::OLE; my ($voice); &Init_Voice(); &Talk("STARTING"); print "\nType something!\n"; while (my $aa = <STDIN>){ print "\nType something!\n"; chomp $aa; &Talk($aa); } sub Init_Voice{ $voice = Win32::OLE->new("Speech.VoiceText") or die("TTS failed"); $voice->Register("", "$0"); $voice->{Enabled} = 1; # optional $voice->{Speed}=150; return $voice; } sub Talk{ my $info = shift; return unless $info; $voice->Speak($info, 1); while ($voice->IsSpeaking()) { sleep 1; } return; } END{ sleep(3); }

Update
You might want to check out Talking Winamp RF remote control, or Voice_Text.pm that comes with Mister House and the documentation for the newest version of MS TTS. which can be obtained here

-Lee

"To be civilized is to deny one's nature."