Share via


SpeechHypothesizedEventArgs Class

This class supports the Microsoft Speech Documentation infrastructure and is not intended to be used directly from your code.

Returns notification from the SpeechHypothesized event.

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

Syntax

'Declaration
<SerializableAttribute> _
Public Class SpeechHypothesizedEventArgs
    Inherits RecognitionEventArgs
[SerializableAttribute] 
public class SpeechHypothesizedEventArgs : RecognitionEventArgs
[SerializableAttribute] 
public ref class SpeechHypothesizedEventArgs : public RecognitionEventArgs
/** @attribute SerializableAttribute() */ 
public class SpeechHypothesizedEventArgs extends RecognitionEventArgs
SerializableAttribute 
public class SpeechHypothesizedEventArgs extends RecognitionEventArgs

Remarks

An instance of SpeechHypothesizedEventArgs is created when the SpeechRecognitionEngine. SpeechHypothesized event is raised.

Detailed information about a tentatively recognized phrase is obtained by the Result property.

Numerous SpeechHypothesized events are generated as a recognition engine attempts to identify an input phrase. Typically, handling these events is only useful for debugging.

SpeechHypothesisEventArgs derives from RecognitionEventArgs.

Inheritance Hierarchy

System.Object
   System.EventArgs
     Microsoft.Speech.Recognition.RecognitionEventArgs
      Microsoft.Speech.Recognition.SpeechHypothesizedEventArgs

Example

In the example below, a delegate is defined to use the instance of SpeechHypothesisEventArgs passed to the handler for SpeechHypothesis events to display information about a tentatively recognized phrase

// Handles the SpeechHypothesis event and displays the Hypothesis result.
            _recognizer.SpeechHypothesis +=
                delegate(object sender, SpeechHypothesisEventArgs eventArgs)
                {
                    DisplayResult(eventArgs);
                };

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

SpeechHypothesizedEventArgs Members
Microsoft.Speech.Recognition Namespace
RecognitionEventArgs Class
RecognitionResult Class
SpeechRecognized
SpeechRecognizedEventArgs