Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

RecognizerState Enumeration

Describes the current state of a desktop speech recognition engine.

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

public enum RecognizerState
public enum RecognizerState
public enum RecognizerState
 Member nameDescription
ListeningThe recognition engine is available to receive and analyze audio input. 
StoppedThe recognition engine is not receiving nor analyzing audio input. 

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.

NoteNote:

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 System.Speech.Recognition.SpeechRecognitionEngine for System.Speech.Recognition.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 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.