Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Text-to-speech in Perl

by shotgunefx (Parson)
on Jul 14, 2002 at 09:33 UTC ( #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? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2022-01-20 20:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (57 votes). Check out past polls.

    Notices?