SpeechHypothesizedEventArgs 类

定义

SpeechHypothesizedSpeechHypothesized 事件返回通知。

此类支持 .NET Framework 基础结构,但不应在应用程序代码中直接使用。

public ref class SpeechHypothesizedEventArgs : System::Speech::Recognition::RecognitionEventArgs
public class SpeechHypothesizedEventArgs : System.Speech.Recognition.RecognitionEventArgs
[System.Serializable]
public class SpeechHypothesizedEventArgs : System.Speech.Recognition.RecognitionEventArgs
type SpeechHypothesizedEventArgs = class
    inherit RecognitionEventArgs
[<System.Serializable>]
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);  
  }  

注解

事件 SpeechHypothesizedSpeechRecognizerSpeechRecognitionEngine 类引发。

可以使用 属性获取有关暂时识别的短语 Result 的详细信息。

识别引擎尝试识别输入短语时会生成许多 SpeechHypothesized 事件。 通常,处理这些事件仅适用于调试。

SpeechHypothesizedEventArgs 派生自 RecognitionEventArgs

属性

Result

获取与语音识别事件关联的识别结果数据。

(继承自 RecognitionEventArgs)

方法

Equals(Object)

确定指定对象是否等于当前对象。

(继承自 Object)
GetHashCode()

作为默认哈希函数。

(继承自 Object)
GetType()

获取当前实例的 Type

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。

(继承自 Object)
ToString()

返回表示当前对象的字符串。

(继承自 Object)

适用于

另请参阅