EmulateRecognizeCompletedEventArgs..::..Result Property |
EmulateRecognizeCompletedEventArgs Class Example See Also Send Feedback |
Gets the results of emulated recognition.
Namespace:
Microsoft.Speech.Recognition
Assembly:
Microsoft.Speech (in Microsoft.Speech.dll)
Syntax
Visual Basic (Declaration) |
---|
Public ReadOnly Property Result As RecognitionResult Get |
Visual Basic (Usage) |
---|
Dim instance As EmulateRecognizeCompletedEventArgs Dim value As RecognitionResult value = instance.Result |
C# |
---|
public RecognitionResult Result { get; } |
Property Value
Type: Microsoft.Speech.Recognition..::..RecognitionResultDetailed information about the results of recognition, or nullNothingnullptrunita null reference (Nothing in Visual Basic) if an error occurred.
Remarks
The RecognitionResult object derives from RecognizedPhrase and contains full information about a phrase returned by a recognition operation. You can obtain a list off all the recognition candidates from the Alternates property.
If recognizer encounters an exception during the recognition operation, the Error property is set to the exception and the Result property is set to nullNothingnullptrunita null reference (Nothing in Visual Basic).
Examples
The example below shows the subscription of an anonymous method to the EmulateRecognizeCompleted event. The method provides a display of state information about the recognized phrase, obtained from the Result property on the instance of EmulateRecognizeCompletedEventArgs passed to the handler.
Copy Code | |
---|---|
_recognizer.EmulateRecognizeCompleted += delegate(object sender, EmulateRecognizeCompletedEventArgs eventArgs) { _asyncEmulation = false; Utils.DisplayAudioInputFormat(_audioStateLabel, _recognizer); Utils.DisplayRecognizerState(_recognizerStateLabel, _recognizer.State); Utils.DisplayAudioInputStatus(_audioDeviceStatusLabel, _recognizer.AudioStatus); DisplayResult(eventArgs.Result); }; |