Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I'm having a problem registering a Microsoft OLE class using Win32::OLE. I'm trying to do some voice recognition using the Speech.VoiceCommand object that comes with the Microsoft Speech API. I've already gotten Perl to talk using Speech.VoiceText by using examples posted here. (PS: Thanks for that!)
When I try to register the Speech.VoiceCommand object, I get the following error:
Win32::OLE(0.1502) error 0x80020009: "Exception occurred in METHOD/PROPERTYGET "Register" at hear.pl line 14
I don't know how to _start_ debugging this! I tried reinstalling the Microsoft Speech API, but it didn't help. I created my code by hacking up some source code from the MisterHouse code on sourceforge. Thanks in advance!!
Here's my code: --------------------------------------------------------
use Win32::OLE; use strict; my $vcmd_ms; $Win32::OLE::Warn = 1; # Warn if ole fails eval {$vcmd_ms = Win32::OLE->GetActiveObject('Speech.VoiceCommand')}; die "VoiceCommand not installed" if $@; unless (defined $vcmd_ms) { $vcmd_ms = Win32::OLE->new('Speech.VoiceCommand'); die Win32::OLE->LastError if (Win32::OLE->LastError()); } $vcmd_ms->Register(""); # this is the line that barfs die Win32::OLE->LastError if (Win32::OLE->LastError());
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Win32::OLE: Problems registering Speech.VoiceCommand
by Anonymous Monk on Aug 30, 2002 at 21:41 UTC | |
|
Re: Win32::OLE: Problems registering Speech.VoiceCommand
by Mr. Muskrat (Canon) on Aug 30, 2002 at 21:04 UTC | |
|
Re: Win32::OLE: Problems registering Speech.VoiceCommand
by Anonymous Monk on Aug 30, 2002 at 21:25 UTC | |
|
Re: Win32::OLE: Problems registering Speech.VoiceCommand
by RMGir (Prior) on Aug 30, 2002 at 21:00 UTC |