Note

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

SpeechRecognitionEngine.RequestRecognizerUpdate Method

Include Protected Members
Include Inherited Members

Requests that the recognizer pauses to update its state.

Overload List

  Name Description
Public method RequestRecognizerUpdate() Requests that the recognizer pauses to update its state.
Public method RequestRecognizerUpdate(Object) Requests that the recognizer pauses to update its state and provides a user token for the associated event.
Public method RequestRecognizerUpdate(Object, TimeSpan) Requests that the recognizer pauses to update its state and provides an offset and a user token for the associated event.

Top

Remarks

Use this method to synchronize changes to the recognizer. For example, if you load or unload a speech recognition grammar while the recognizer is processing input, use this method and the RecognizerUpdateReached event to synchronize your application behavior with the state of the recognizer.

When this method is called, the recognizer pauses or completes asynchronous operations and generates a RecognizerUpdateReached event. A RecognizerUpdateReached event handler can then modify the state of the recognizer in between recognition operations. When handling RecognizerUpdateReached events, a speech recognition engine pauses until the event handler returns.

Note

If the input to the recognizer is changed before the recognizer raises the RecognizerUpdateReached event, the request is discarded.

When this method is called:

  • If the recognizer is not processing input, the recognizer immediately generates the RecognizerUpdateReached event.

  • If the recognizer is processing input that consists of silence or background noise, the recognizer pauses the recognition operation and generates the RecognizerUpdateReached event.

  • If the recognizer is processing input that does not consist of silence or background noise, the recognizer completes the recognition operation and then generates the RecognizerUpdateReached event.

While the recognizer is handling the RecognizerUpdateReached event:

  • The recognizer does not process input, and the value of the RecognizerAudioPosition property remains the same.

  • The recognizer continues to collect input, and the value of the AudioPosition property can change.

See Also

Reference

SpeechRecognitionEngine Class

SpeechRecognitionEngine Members

Microsoft.Speech.Recognition Namespace