Hi Monks,

My question today has to do with Win32::OLE and SAPI5 speech recognition. This is not a SAPI question but is a Perl question.

I believe that I've accomplished my task of capturing speech recognition events but am unable to convert the HASH to text. I'm able to run my code concurrently with the SAPI5 VB example and see that recognition events are occuring simutaneously.

My output looks as follows (example):

$self = "a hash which is not the problem".
$event = 7 # an event number
$streamnumber = 1 # belongs to my application
$steamposition = 185280 # an index to keep recognition objects in order
$recognition type = 0 # it's for dictation
$result = Win32::OLE=HASH(0x19ad68c) # this should be pointing to the location of the recognized word or word combinations.

My sample code:

sub OnRecognition { my($self,$event,$streamnumber,$steamposition,$recognitiontyp +e,$result) = @_; my $newresult = $self->Invoke('Dispatch',$result); # What now ??? }
Thanks much.

In reply to Help with SAPI5 Speech Recognition HASH by snake_mountain

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.