Delen via


Note

Please see Azure Cognitive Services for Speech documentation for the latest supported speech solutions.

EmulateRecognizeCompletedEventArgs.Result Property

Gets the results of emulated recognition.

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

Syntax

'Declaration
Public ReadOnly Property Result As RecognitionResult
    Get
'Usage
Dim instance As EmulateRecognizeCompletedEventArgs
Dim value As RecognitionResult

value = instance.Result
public RecognitionResult Result { get; }

Property Value

Type: Microsoft.Speech.Recognition.RecognitionResult
Detailed information about the results of recognition, or a 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 a 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.

_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);
};

See Also

Reference

EmulateRecognizeCompletedEventArgs Class

EmulateRecognizeCompletedEventArgs Members

Microsoft.Speech.Recognition Namespace

EmulateRecognizeCompletedEventArgs

EmulateRecognizeCompleted

EmulateRecognize([], CompareOptions)

EmulateRecognizeAsync

SpeechRecognitionEngine

AsyncCompletedEventArgs