This documentation is archived and is not being maintained.

RecognizerState Enumeration

Enumerates values of the recognizer's state.

Namespace:  System.Speech.Recognition
Assembly:  System.Speech (in System.Speech.dll)

public enum RecognizerState

Member nameDescription
StoppedThe recognition engine is not receiving or analyzing audio input.
ListeningThe recognition engine is available to receive and analyze audio input.

RecognizerState encapsulates the running state of the default speech recognition engine for clients using SpeechRecognizer to access the Windows Desktop Speech Recognition Technology service.

Applications can obtain the current state of the desktop recognition engine as a RecognizerState object by querying the State property on a SpeechRecognizer instance. To obtain the state of the desktop recognition engine after it changes, applications can query the RecognizerState property of the StateChangedEventArgs object passed to a handler for StateChanged events.


SpeechRecognitionEngine instances run in-process and their running state is under the control of the application. Therefore, SpeechRecognitionEngine does not contain a property to return a RecognizerState object.

The state of a desktop speech recognition server is a read-only property and cannot be controlled programmatically. Users can change a shared speech recognizer's state using the Speech Recognition user interface (UI) or through the Speech Recognition member of the Windows Control Panel. The following image shows the speech recognition user interface and its menu of commands in Windows 7.

Both the On and Sleep settings in the Speech Recognition UI correspond to the Listening state. The Off setting in the Speech Recognition UI corresponds to Stopped.

Enabled is the other property that affects the readiness of a shared speech recognition engine to receive and process speech input. You can use Enabled to control whether or not a shared speech recognition engine's grammars are active for recognition. However, changing the Enabled property has no effect on the RecognizerState property.

Information such as the description, the supported culture and audio formats, and the recognition engine name is encapsulated in the RecognizerInfo type.

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

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.