RecognizerState Enumeration

Enumerates values of the recognizer's state.

Namespace: Microsoft.Speech.Recognition
Assembly: Microsoft.Speech (in microsoft.speech.dll)

Syntax

'Declaration
Public Enumeration RecognizerState
public enum RecognizerState
public enum class RecognizerState
public enum RecognizerState
public enum RecognizerState

Members

Member name Description
Listening The recognition engine is available to receive and analyze audio input.
Stopped The recognition engine is not receiving or analyzing audio input.

Remarks

RecognizerState encapsulates the state the current running state of the default speech recognition engine for clients using SpeechRecognizer.

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 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 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 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.

Example

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();
    };

Platforms

Development Platforms

Windows XP Professional with Service Pack 2 (SP2), Windows Server 2003, Windows Vista Ultimate Edition, Windows Vista Business Edition, Windows Vista Enterprise Edition

Target Platforms

See Also

Reference

Microsoft.Speech.Recognition Namespace
RecognizerState
SpeechRecognizer
Enabled
State
StateChangedEventArgs
RecognizerState
StateChanged