RecognizeAsync Method

Microsoft Speech Platform SDK 11

Collapse imageExpand ImageCopy imageCopyHover image

Starts an asynchronous speech recognition operation.

Overload List

  NameDescription
Public methodRecognizeAsync()()()()Performs a single, asynchronous speech recognition operation.
Public methodRecognizeAsync(RecognizeMode)Performs one or more asynchronous speech recognition operations.
Top

Remarks

These methods perform single or multiple, asynchronous recognition operations. The recognizer performs each operation against its loaded and enabled speech recognition grammars.

During a call to this method, the recognizer can raise the following events:

To retrieve the result of an asynchronous recognition operation, attach an event handler to the recognizer's SpeechRecognized event. The recognizer raises this event whenever it successfully completes a synchronous or asynchronous recognition operation. If recognition was not successful, the Result property on RecognizeCompletedEventArgs object, which you can access in the handler for the RecognizeCompleted event, will be nullNothingnullptrunita null reference (Nothing in Visual Basic).

An asynchronous recognition operation can fail for the following reasons:

  • Speech is not detected before the timeout intervals expire for the BabbleTimeout or InitialSilenceTimeout properties.

  • The recognition engine detects speech but finds no matches in any of its loaded and enabled Grammar objects.

The SpeechRecognitionEngine must have at least one Grammar object loaded before performing recognition. To load a speech recognition grammar, use the LoadGrammar or LoadGrammarAsync method.

To modify how the recognizer handles the timing of speech or silence with respect to recognition, use the BabbleTimeout, InitialSilenceTimeout, EndSilenceTimeout, and EndSilenceTimeoutAmbiguous properties.

To perform synchronous recognition, use one of the Recognize methods.

See Also