RecognizerState Enumeration
Enumerates values of the recognizer's state.
Assembly: System.Speech (in System.Speech.dll)
RecognizerState encapsulates the state the current running state of the default speech recognition engine for clients using SpeechRecognizer to access the Windows Desktop Speech Recognition Technology service.
Clients use the State property on SpeechRecognizer.
Note:
|
|---|
|
Because applications using SpeechRecognitionEngine are in-process and their running state is under the control of the application, SpeechRecognitionEngine contains no property to return a RecognizerState object. |
Programmatically, the state of a desktop speech recognition server can be controlled through the Enabled() property on a SpeechRecognizer object. When Enabled() is true, recognizer state should be Listening. When Enabled() is false, recognizer state should be Stopped.
Applications can obtain the desktop recognition engine state as an instances of RecognizerState by querying the State property on a SpeechRecognizer instance, or through the RecognizerState property of the StateChangedEventArgs object passed to a handlers for StateChanged events.
The Windows Desktop Speech Recognition Technology server state can also be altered by the Speech member of the Control Panel.
Information such as the description, the supported culture and audio formats, and the recognition engine name is encapsulated in the RecognizerInfo type, which can be obtained by RecognizerInfo on the SpeechRecognizer class, or RecognizerInfo on the SpeechRecognitionEngine class, and can be used in the constructor for SpeechRecognitionEngine.
In the example below, an application displays the state of a recognizer in its implementation of a handler for the StateChanged event.
_recognizer.StateChanged +=
delegate(object sender, StateChangedEventArgs eventArgs) {
_recognizerStateLabel.Text = "Speech Recognizer State: " + eventArgs.RecognizerState.ToString();
};
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.
Note: