| Description SUI_InitializeSR activates the speech recognition engine. This command must be called once before any other speech recognition commands can be used.
The speech settings pertain to those specified in the Speech Control Panel (Mac OS only).
The mode parameter specifies how to utilize certain recognition settings:
1: The feedback window is not shown and listening settings are ignored 2: The feedback window is not shown but listening settings are used 3: The feedback window is shown and listening settings are used
Generally, mode #3 should be used unless you write your own feedback system.
Error Codes >0: speech engines failed to initialize -1: speech engines already initialized -2: demo mode has timed-out -3: Classic Environment detected
Support for Recognition from an Audio File
You can now perform speech recognition from an audio file (16-bit mono 44 KHz AIFF). When you initialize speech using SUI_InitializeSR, pass 2 as the 2nd parameter, which signifies the use of an audio file. Secondly, when you call SUI_SetListenState with a first parameter of 1 (to listen), pass the path name of the audio file as the 2nd parameter.
When recognizing speech from an audio file, it's important to note that the speech engine will perform recognition very quickly, even if the utterances are spaced out in the recording. For this reason, you should listen for complete phrases, and you should not perform logical and/or interface operations. In other words, don't change models based on previous utterances, don't open windows, etc.
|