Deila með


RecognizerState Enum

Definition

Enumerates values of the recognizer's state.

public enum class RecognizerState
public enum RecognizerState
type RecognizerState = 
Public Enum RecognizerState
Inheritance
RecognizerState

Fields

Name Value Description
Stopped 0

The recognition engine is not receiving or analyzing audio input.

Listening 1

The recognition engine is available to receive and analyze audio input.

Examples

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

Remarks

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.

Note

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.

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.

Applies to

See also