Export (0) Print
Expand All

SpeechRecognitionEngine.EmulateRecognize Method

Emulates input to the speech recognizer, using text in place of audio for synchronous speech recognition.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  NameDescription
Public method EmulateRecognize(String) Emulates input of a phrase to the speech recognizer, using text in place of audio for synchronous speech recognition.
Public method EmulateRecognize(RecognizedWordUnit[], CompareOptions) Emulates input of specific words to the speech recognizer, using text in place of audio for synchronous speech recognition, and specifies how the recognizer handles Unicode comparison between the words and the loaded speech recognition grammars.
Public method EmulateRecognize(String, CompareOptions) Emulates input of a phrase to the speech recognizer, using text in place of audio for synchronous speech recognition, and specifies how the recognizer handles Unicode comparison between the phrase and the loaded speech recognition grammars.
Top

These methods bypass the system audio input and provide text to the recognizer as String objects or as an array of RecognizedWordUnit objects. This can be helpful when you are testing or debugging an application or grammar. For example, you can use emulation to determine whether a word is in a grammar and what semantics are returned when the word is recognized. Use the SetInputToNull() method to disable audio input to the speech recognition engine during emulation operations.

The speech recognizer raises the SpeechDetected, SpeechHypothesized, SpeechRecognitionRejected, and SpeechRecognized events as if the recognition operation is not emulated. The recognizer ignores new lines and extra white space and treats punctuation as literal input.

NoteNote

The RecognitionResult object generated by the speech recognizer in response to emulated input has a value of null for its Audio property.

To emulate asynchronous recognition, use the EmulateRecognizeAsync method.

Community Additions

ADD
Show:
© 2014 Microsoft