Sdílet prostřednictvím


StateChangedEventArgs.RecognizerState Vlastnost

Definice

Získá aktuální stav sdíleného modulu pro rozpoznávání řeči ve Windows.

public:
 property System::Speech::Recognition::RecognizerState RecognizerState { System::Speech::Recognition::RecognizerState get(); };
public System.Speech.Recognition.RecognizerState RecognizerState { get; }
member this.RecognizerState : System.Speech.Recognition.RecognizerState
Public ReadOnly Property RecognizerState As RecognizerState

Hodnota vlastnosti

Instance RecognizerState , která označuje, zda je Listening stav sdíleného modulu pro rozpoznávání řeči nebo Stopped.

Příklady

Následující příklad aktualizuje zobrazení na základě informací o stavu poskytované instancí, která je získána RecognizerState z RecognizerState vlastnosti StateChangedEventArgs instance předané obslužné rutině StateChanged události.

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

Platí pro