SpeechRecognitionEngine.EmulateRecognize Method

Provides support for synchronous simulation of audio input to support testing and debugging.

Remarks

The EmulateRecognize object allows for testing and debugging of the applications and grammars using synchronous recognition technology without dependency on a system’s audio input technology.

Instead of using audio information as input, the EmulateRecognize methods can accept a string or an array of RecognizedWordUnit objects as an argument.

Applications obtain results from synchronous emulation of speech recognition either by the instance of RecognitionResult returned by EmulateRecognize, or by handling the events that would be produced by actual audio input: SpeechDetected, SpeechHypothesized, SpeechRecognitionRejected, SpeechRecognized.

Note

When emulating recognition the Audio property on a RecognitionResult object will be null.

Emulated recognition ignores new lines and extra white space and treats punctuation literally, rather than letting it define phrases.

Asynchronous simulation can be obtained through EmulateRecognizeAsync.

SpeechRecognizeEmulateRecognizeAsyncRecognizedWordUnit

Overload List

Name Description
SpeechRecognitionEngine.EmulateRecognize (String)
Synchronously simulate audio input to the recognition engine with a String.
SpeechRecognitionEngine.EmulateRecognize (RecognizedWordUnit[], CompareOptions)
Synchronously simulate audio input to the recognition engine with an array of RecognizedWordUnit objects and specified case sensitivity.
SpeechRecognitionEngine.EmulateRecognize (String, CompareOptions)
Synchronously simulate audio input to the recognition engine with a String and specified case sensitivity.

See Also

Reference

SpeechRecognitionEngine Class
SpeechRecognitionEngine Members
Microsoft.Speech.Recognition Namespace
SpeechRecognize
SpeechRecognitionEngine.EmulateRecognize Method
EmulateRecognizeAsync
SpeechRecognize
EmulateRecognizeAsync
RecognizedWordUnit Class