SpeechHypothesizedEventArgs 類別

定義

SpeechHypothesizedSpeechHypothesized 事件傳回通知。

這個類別支援 .NET Framework 基礎結構,但不能直接使用於應用程式程式碼中。

public ref class SpeechHypothesizedEventArgs : System::Speech::Recognition::RecognitionEventArgs
[System.Serializable]
public class SpeechHypothesizedEventArgs : System.Speech.Recognition.RecognitionEventArgs
public class SpeechHypothesizedEventArgs : System.Speech.Recognition.RecognitionEventArgs
[<System.Serializable>]
type SpeechHypothesizedEventArgs = class
    inherit RecognitionEventArgs
type SpeechHypothesizedEventArgs = class
    inherit RecognitionEventArgs
Public Class SpeechHypothesizedEventArgs
Inherits RecognitionEventArgs
繼承
SpeechHypothesizedEventArgs
屬性

範例

下列範例會建立 SpeechRecognizer.SpeechHypothesizedSpeechRecognitionEngine.SpeechHypothesized 事件的處理常式。 處理常式會使用 的 SpeechHypothesizedEventArgs 實例來傳回和顯示暫訂辨識片語的相關資訊。

// Create a handler for the SpeechHypothesized event.  
recognizer.SpeechHypothesized += new EventHandler<SpeechHypothesizedEventArgs>(recognizer_SpeechHypothesized);  

// Handle the event and display the hypothesized result.  
void recognizer_SpeechHypothesized (object sender, SpeechHypothesizedEventArgs e)  
  {  
    Console.WriteLine("Hypothesized text: " + e.Result.Text);  
  }  

備註

SpeechHypothesizedSpeechRecognitionEngine 類別會 SpeechRecognizer 引發事件。

您可以使用 屬性取得暫訂辨識片語 Result 的詳細資訊。

許多 SpeechHypothesized 事件都會產生為辨識引擎嘗試識別輸入片語。 一般而言,處理這些事件僅適用于偵錯。

SpeechHypothesizedEventArgs 衍生自 RecognitionEventArgs

屬性

Result

取得與語音辨識事件關聯的辨識結果資料。

(繼承來源 RecognitionEventArgs)

方法

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。

(繼承來源 Object)

適用於

另請參閱