This topic has not yet been rated - Rate this topic

SpeechRecognitionEngine.EmulateRecognizeAsync Method

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

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) Asynchronously simulate audio input to the Windows Desktop Speech Technology recognition engine with [string].
Public method EmulateRecognizeAsync(RecognizedWordUnit[], CompareOptions) Asynchronously simulate audio input to the Windows Desktop Speech Technology recognition engine with an array of RecognizedWordUnit objects and specified case sensitivity.
Public method EmulateRecognizeAsync(String, CompareOptions) Asynchronously simulate audio input to the Windows Desktop Speech Technology recognition engine with a [string] and specified case sensitivity.
Top

The EmulateRecognizeAsync object allows for testing and debugging of the applications and grammars using asynchronous 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.

The EmulateRecognizeAsync methods return void. Therefore, applications can only obtain results from asynchronous emulation of speech recognition by handling the events that would be produced by actual audio input: SpeechDetected, SpeechHypothesized, SpeechRecognitionRejected, SpeechRecognized.

On completion, rather than generating a RecognizeCompleted event, a EmulateRecognizeAsync operation generates a EmulateRecognizeCompleted event, which receives a EmulateRecognizeCompletedEventArgs object (which is derived from [AsyncCompletedEventArgs] as an argument.

Note Note:

When emulating recognitionthe Audio property on the RecognitionResult() will be null.

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

Synchronous simulation can be obtained through EmulateRecognize.

Reference

SpeechRecognize
EmulateRecognize()
[(System.String,System.Globalization.CompareOptions)]
EmulateRecognizeAsync
EmulateRecognizeAsync
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ