SpeechRecognitionEngine.EmulateRecognizeCompleted Event
Event generated when an asynchronous emulation of speech recognition completes.
Assembly: System.Speech (in System.Speech.dll)
The EmulateRecognizeCompleted event is generated in place of the RecognizeCompleted event on the completion of a EmulateRecognizeAsync operation.
The results of a speech recognition operation can be obtained in a handler subscribed to EmulateRecognizeCompleted by using the Result property found on the EmulateRecognizeCompletedEventArgs[object] passed to the method.
Speech recognition emulation generates both standard speech recognition events (such as SpeechRecognized) as well as the EmulateRecognizeCompleted event.
Handlers subscribed to the standard event are called prior to the handler for EmulateRecognizeCompleted. For example, the hander for SpeechRecognized is called prior to calling the handler subscribing to EmulateRecognizeCompleted.
The example below shows the subscription of an anonymous method to the EmulateRecognizeCompleted. The method provides a display of state information about the recognized phrase.
_recognitionEngine.EmulateRecognizeCompleted += delegate(object sender, EmulateRecognizeCompletedEventArgs eventArgs) {
_asyncEmulation = false;
Utils.DisplayAudioInputFormat(_audioStateLabel, _recognitionEngine);
DisplayResult(eventArgs);
};
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.