Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Text To Speech: Specifying Your Engine

by mdog (Pilgrim)
on May 06, 2003 at 18:13 UTC ( [id://255972]=perlquestion: print w/replies, xml ) Need Help??

mdog has asked for the wisdom of the Perl Monks concerning the following question:

Brethern --

I know how to get text to speech work thanks to Rudif in this thread.

But how do you specify what engine you want to use? I have the AT&T NaturalVoices engine but when I use the code snippet below, it uses the MS TTS. It does this even after I go into my Windows-->Control Panel-->Speech and specify the AT&T voice.

Any ideas?

Thanks,
mdog

use strict; use warnings; use Win32::OLE; # Set up speech. my $voice = Win32::OLE->new("Speech.VoiceText") or die("TTS failed"); $voice->Register("", "$0"); $voice->{Enabled} = 1; # optional my $question = <<__EOS__; Would you like to play a game? How about global thermonuclear war? __EOS__ my $answer = <<__EOS__; __EOS__ $voice->Speak($question, 1); $voice->Speak($answer, 1); while ($voice->IsSpeaking()) { sleep 1; }

Edit by tye, remove domain from internal links

Replies are listed 'Best First'.
Re: Text To Speech: Specifying Your Engine
by PodMaster (Abbot) on May 07, 2003 at 11:41 UTC
    See what pvoice does (http://www.pvoice.org).


    MJD says you can't just make shit up and expect the computer to know what you mean, retardo!
    I run a Win32 PPM repository for perl 5.6x+5.8x. I take requests.
    ** The Third rule of perl club is a statement of fact: pod is sexy.

Re: Text To Speech: Specifying Your Engine
by Jouke (Curate) on May 07, 2003 at 18:11 UTC
    Specifically for pVoice I created Win32::MSAgent. It uses the Microsoft Agent for speech synthesis (and under the hood that uses the MS Speech API 4.0a).

    With this module you can select voices and languages. See the included documentation for it.

    Jouke Visser, Perl 'Adept'
    Using Perl to help the disabled: pVoice, pType and pStory

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-03-29 07:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found