StateChangedEventArgs.RecognizerState Property

Gets the current state of the recognition engine.

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

Syntax

'Declaration
Public ReadOnly Property RecognizerState As RecognizerState
public RecognizerState RecognizerState { get; }
public:
property RecognizerState RecognizerState {
    RecognizerState get ();
}
/** @property */
public RecognizerState get_RecognizerState ()
public function get RecognizerState () : RecognizerState

Property Value

Returns a RecognizerState object containing full information about a recognition engine.

Example

The example below updates a display based on the state information provided by and instance of RecognizerState obtained from the RecognizerState property of an instance of StateChangedEventArgs passed to a handler for a StateChanged.

//Make sure that _recognizer and recognition start buttons are disabled if state is stopped.
//Reenable the start button to allow manual reenable if start is listening
_recognizer.StateChanged +=
    delegate(object sender, StateChangedEventArgs eventArgs) {
        _recognizerStateLabel.Text = "Speech Recognizer State: " + eventArgs.RecognizerState.ToString();
    };

Thread Safety

All public static (Shared in Visual Basic) members of this type are thread-safe. Instance members are not guaranteed to be thread-safe.

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

StateChangedEventArgs Class
StateChangedEventArgs Members
Microsoft.Speech.Recognition Namespace