共用方式為


StateChangedEventArgs.RecognizerState 屬性

定義

取得在 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

屬性值

RecognizerState 執行個體,會表示共用的語音辨識引擎的狀態是 ListeningStopped

範例

下列範例會根據實例所提供的 RecognizerState 狀態資訊,根據從傳遞至事件處理常式 StateChanged 之實例的 StateChangedEventArgs 屬性取得 RecognizerState 的狀態資訊,來更新顯示。

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

適用於