This documentation is archived and is not being maintained.

SpeechRecognizer.State Property

Read-only property providing configuration information about the current running state of theWindows Desktop Speech Technology recognition engine in use.

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

public RecognizerState State { get; }
/** @property */
public RecognizerState get_State ()

public function get State () : RecognizerState

Not applicable.

Property Value

Returns an instance of RecognizerState containing configuration information about the running state of the Windows Desktop Speech Technology recognition engine currently in use.

For information about the configuration of the Windows Desktop Speech Technology recognition engine in use, including a description, the supported culture and audio formats, and the recognition engine name RecognizerInfo.

NoteNote:

As a point of contrast between SpeechRecognizer and SpeechRecognitionEnginebasedapplications, programs 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.

The example below shows a static utility function called to display information from State in a Label.


Utils.DisplayRecognizerState(_recognizerStateLabel, _recognizer.State);
/*
*
*/

internal static void DisplayRecognizerState(Label label, RecognizerState state) {
    
    if (label != null && state <= RecognizerState.Listening) {
label.Text = String.Format("Speech Recognizer State:   {0}\n", state.ToString());
    }
}

Utils.DisplayRecognizerState(_recognizerStateLabel, _recognizer.State);
/*
*
*/

internal static void DisplayRecognizerState(Label label, RecognizerState state) {
    
    if (label != null && state <= RecognizerState.Listening) {
label.Text = String.Format("Speech Recognizer State:   {0}\n", state.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
Show: