EmulateRecognize Method

SpeechRecognizer.EmulateRecognize Method

 

Emulates input to the shared speech recognizer, using text instead of audio for synchronous speech recognition.

Namespace:   System.Speech.Recognition
Assembly:  System.Speech (in System.Speech.dll)

NameDescription
System_CAPS_pubmethodEmulateRecognize(RecognizedWordUnit[], CompareOptions)

Emulates input of specific words to the shared speech recognizer, using text instead of audio for synchronous speech recognition, and specifies how the recognizer handles Unicode comparison between the words and the loaded speech recognition grammars.

System_CAPS_pubmethodEmulateRecognize(String)

Emulates input of a phrase to the shared speech recognizer, using text instead of audio for synchronous speech recognition.

System_CAPS_pubmethodEmulateRecognize(String, CompareOptions)

Emulates input of a phrase to the shared speech recognizer, using text instead of audio for synchronous speech recognition, and specifies how the recognizer handles Unicode comparison between the phrase and the loaded speech recognition grammars.

These methods bypass the system audio input. This can be helpful when you are testing or debugging an application or grammar.

System_CAPS_noteNote

If Windows Speech Recognition is in the Sleeping state, then these methods return null.

The shared 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.

System_CAPS_noteNote

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

To emulate asynchronous recognition, use the EmulateRecognizeAsync method.

Return to top
Show:
© 2016 Microsoft