SpeechRecognitionRejectedEventArgs Class
Returns notification from the SpeechRecognitionRejected event.
Namespace: Microsoft.Speech.Recognition
Assembly: Microsoft.Speech (in microsoft.speech.dll)
Syntax
'Declaration
<SerializableAttribute> _
Public Class SpeechRecognitionRejectedEventArgs
Inherits RecognitionEventArgs
[SerializableAttribute]
public class SpeechRecognitionRejectedEventArgs : RecognitionEventArgs
[SerializableAttribute]
public ref class SpeechRecognitionRejectedEventArgs : public RecognitionEventArgs
/** @attribute SerializableAttribute() */
public class SpeechRecognitionRejectedEventArgs extends RecognitionEventArgs
SerializableAttribute
public class SpeechRecognitionRejectedEventArgs extends RecognitionEventArgs
Remarks
An instance of SpeechRecognitionRejectedEventArgs is created when the SpeechRecognitionEngine.SpeechRecognitionRejected event is raised.
SpeechRecognitionRejected events are generated when no speech recognition hypothesis scores high enough for a recognizer to accept it.
Detailed information about rejected phrases is available through the Result property.
SpeechRecognitionRejectedEventArgs derives from RecognitionEventArgs.
Inheritance Hierarchy
System.Object
System.EventArgs
Microsoft.Speech.Recognition.RecognitionEventArgs
Microsoft.Speech.Recognition.SpeechRecognitionRejectedEventArgs
Example
In the example below, a delegate is defined to use the instance of SpeechRecognitionRejctedEventArgs passed to the handler for SpeechRecognitionRejected events to display information about rejected phrases.
// 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
SpeechRecognitionRejectedEventArgs Members
Microsoft.Speech.Recognition Namespace
RecognitionEventArgs Class
RecognitionResult Class
SpeechRecognitionEngine.SpeechRecognitionRejected Event
SpeechRecognitionEngine.SpeechRecognized Event
SpeechRecognizedEventArgs
SpeechRecognitionEngine.SpeechHypothesized Event
SpeechHypothesizedEventArgs