Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Text-to-speech in Perl

by shotgunefx (Parson)
on Jul 14, 2002 at 09:33 UTC ( [id://181558]=note: print w/replies, xml ) Need Help??


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."

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://181558]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-04-18 19:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found