Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Text-to-speech in Perl

by Beatnik (Parson)
on Jul 13, 2002 at 14:47 UTC ( [id://181486]=note: print w/replies, xml ) Need Help??


in reply to Text-to-speech in Perl

Note: This example is HEAVILY based on the AgentChat script available somewhere in this monastery.
#!/usr/local/bin/perl -w use Win32::OLE; use Win32::OLE::Variant; $sound="Yup"; use vars qw($Agent); use vars qw(%Languages $VERSION); %Languages = ( English => 0x0409, French => 0x040C, German => 0x0407, Italian => 0x0410, Portuguese => 0x0816, Spanish => 0x0C0A, Dutch => 0x0413, ); Win32::OLE->Initialize(Win32::OLE::COINIT_MULTITHREADED); $Agent = Win32::OLE->new('Agent.Control.2') or die Win32::OLE->LastErr +or(); $Agent->{Connected} = Variant(VT_BOOL, 1); $Agent->Characters->Load('Merlin','merlin.acs') or die Win32::OLE-> +LastError(); $Characters{agent} = $Agent->Characters('Merlin'); $Characters{agent}->{LanguageID}=$Languages{English}; $Characters{agent}->Show; $Characters{agent}->Play("Greet"); $Characters{agent}->Speak("Hallo"); $Characters{agent}->Speak("The quick brown fox jumps over the lazy dog +."); $Characters{agent}->Speak("She sells sea shells on the sea shore."); $Characters{agent}->Speak("There's more than one way to do it."); $Characters{agent}->Hide;
No credits for me. t0mas++

Greetz
Beatnik
...Perl is like sex: if you're doing it wrong, there's no fun to it.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-03-29 11:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found