SpeechRecognizer.EmulateRecognizeAsync Method

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

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

  Name Description
Public method EmulateRecognizeAsync(String) Emulates input of a phrase to the shared speech recognizer, using text instead of audio for asynchronous speech recognition.
Public method EmulateRecognizeAsync(RecognizedWordUnit[], CompareOptions) Emulates input of specific words to the shared speech recognizer, using text instead of audio for asynchronous speech recognition, and specifies how the recognizer handles Unicode comparison between the words and the loaded speech recognition grammars.
Public method EmulateRecognizeAsync(String, CompareOptions) Emulates input of a phrase to the shared speech recognizer, using text instead of audio for asynchronous 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. This can be helpful when you are testing or debugging an application or grammar.

The shared recognizer raises the SpeechDetected, SpeechHypothesized, SpeechRecognitionRejected, and SpeechRecognized events as if the recognition operation is not emulated. When the recognizer completes the asynchronous recognition operation, it raises the EmulateRecognizeCompleted event. The recognizer ignores new lines and extra white space and treats punctuation as literal input.

Note Note

If Windows Speech Recognition is in the Sleeping state, then the shared recognizer does not process input and does not raise the SpeechDetected and related events, but still raises the EmulateRecognizeCompleted event.

Note Note

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

To emulate synchronous recognition, use the EmulateRecognize method.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft