Hi,

I have found the following script example that can speak a text using the
standard MS text-to-speech sinthesizer.
It works fine.

I am using Windows 2000, and I have the Narrator screen reader installed and
it uses MS text-to-speech, but I have also installed IBM ViaVoice
sinthesizer for Windows, and I can use it with Narrator.

I am wondering if it is also possible to create a perl program that uses
ViaVoice sinthesizer under Windows, because ViaVoice is also SAPI compliant,
just like MS text-to-speech sinth.

I have tried (like in the example below) to replace the class ID of MS
text-to-speech with the Registry class ID of Viavoice, but it doesn't work,
giving an error that tells that the "Speak" method cannot be applied to an
undef variable.

I would like to use Viavoice, because it is more clear than MS
text-to-speech, and I am blind, so I would like to use it in some
applications.

Thank you very much.
Teddy


use Win32::OLE qw( EVENTS );

my $DirectSS =
new Win32::OLE( "{EEE78591-FE22-11D0-8BEF-0060081841DE}" );
#I have also tried this class ID from Registry for Viavoice:
##new Win32::OLE( "{9657E2E0-F99F-11d2-A420-00203521503F}" );

$DirectSS->Speak("Good evening, Mr. Anderson.  How's your day been?  G
+oooood.  Well, listen, I'm going to have to ask you to be assimilated
+ into the Borg because, yeah, resistance is futile.  Oh, and about th
+ose TPS reports.  Yeah, didja get that memo?  You see, we're putting
+new cover sheets on all our TPS reports.  By the way, I've taken the
+liberty of searching, searching, searching out. your domain controlle
+rs.  It seems they're named charles and michael.  or should i say, we
+re?  cuz now they're pete and repeat.  yeah.  how do you like that?
+by the way, if pete and repeat are in a boat and pete jumps out,
who's left?  Ok, i'll say it again.  if pete and repeat are in a boat
+and pete jumps out, who's left?  that was a little borg humor for you
+.  most people don't know about it, but we can be a regular barrel of
+ laughs when we want to.  and remember: anything is possible, except
+skiing through a revolving door.  Because then where would we be?  no
+where, that's where.  by the way, you're logged in as " . getlogin .
+".  We Borg know that kind of stuff.  It's what we do, so we have to
+be good at it.  and we are.  we're really good.  really good.  really
+, really good. in fact, so good that we know that everything about yo
+ur computer.  everything.  have a pleasant remainder of your day.  ch
+eers from the borg.
");

while( $DirectSS->{Speaking} )
{
Win32::OLE->SpinMessageLoop();
Win32::Sleep( 100 );
}


Teddy


_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to