







This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.
Provides data for the SpeechHypothesized event.
Inheritance Hierarchy
System..::..EventArgs
Microsoft.Speech.Recognition..::..RecognitionEventArgs
Microsoft.Speech.Recognition..::..SpeechHypothesizedEventArgs
Namespace:
Microsoft.Speech.Recognition
Assembly:
Microsoft.Speech (in Microsoft.Speech.dll)
Syntax
| Visual Basic (Declaration) |
|---|
<SerializableAttribute> _ Public Class SpeechHypothesizedEventArgs _ Inherits RecognitionEventArgs |
| Visual Basic (Usage) |
|---|
Dim instance As SpeechHypothesizedEventArgs |
| C# |
|---|
[SerializableAttribute] public class SpeechHypothesizedEventArgs : RecognitionEventArgs |
Remarks
An instance of SpeechHypothesizedEventArgs is created when the SpeechRecognitionEngine object raises the SpeechHypothesized event. To obtain detailed information about a tentatively recognized phrase, access the Result property in the handler for the event.
Numerous SpeechHypothesized events are generated as a recognition engine attempts to identify an input phrase. Typically, handling these events is only useful for debugging.
SpeechHypothesizedEventArgs derives from RecognitionEventArgs.
Examples
In the example below, a delegate is defined to use the instance of SpeechHypothesizedEventArgs passed to the handler for SpeechHypothesized events to display information about a tentatively recognized phrase.
Copy Code | |
|---|---|
// 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);
} | |
