On Mon, 13 Jun 2005, Sisyphus wrote:
> ----- Original Message -----
On Tue, 14 Jun 2005, "Jon Bjornstad" <[EMAIL PROTECTED]> wrote:
> 
> > This code:
> >
> > use Win32::Ole;
> > my $voice = Win32::Ole->new("Speech.VoiceText");
> > $voice->Register('', 'Perl');
> > $voice->speak("hello world");
> > <STDIN>;        # wait til it finishes speaking
> >
> > has been used succesfully on Windows98 (with the
> > Microsoft Speech SDK installed) and on Windows 2000
> > (which has it installed by default, apparently).
> >
> 
> Doesn't work for me on Windows 2000. Even after I correct the typos (both
> instances of "Ole" need to be replaced with "OLE") and 'use warnings;' all I
> get is:
> 
> Win32::OLE(0.1502) error 0x8002000e: "Invalid number of parameters"
>     in METHOD/PROPERTYGET "speak" at speak.pl line 5
> 
> Does 'use warnings;' result in the same warning on XP ?

I think Speak() takes 2 arguments. At least it did when I played with it
for my OSCON talk in 1999:

http://opensource.activestate.com/authors/jandubois/Perl/TPC3/fun.html#Can_I_access_COM_OLE_objects_f

So try something like

  $voice->speak("hello world", 0);

in the script above.

Cheers,
-Jan



_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to