Progress and SAPI 5.1

kirvine

New Member
I am trying to use Microsoft Speech with a Progress program. I can tell that I am activating the voice recognition engine by monitoring the window processes but, can not seem to capture the event when the engine returns with some text. Here is the text I am using to start the engine:

CREATE "SAPI.SpSharedRecoContext" cmSharedContext.
cmSharedContext:ENABLE-EVENTS('SAPIEvents').

cmGrammar = cmSharedContext:CreateGrammar(0).
cmGrammar:DictationLoad('',0). /*DictationLoad */
cmGrammar:DictationSetState(1). /* DictationSetState */



and here is my attempt to capture the recognition event:

PROCEDURE SAPIEvents.Recognition :
DEFINE INPUT PARAMETER StreamNumber AS INTEGER.
DEFINE INPUT PARAMETER StreamPosition AS INTEGER.
DEFINE INPUT PARAMETER RecognitionType AS INTEGER.
DEFINE INPUT PARAMETER Result-Hdl AS COM-HANDLE.

MESSAGE "HELLO" VIEW-AS ALERT-BOX.

END PROCEDURE.

Any help would be appreciated.
 
Back
Top