Skip to content

Latest commit

 

History

History
67 lines (41 loc) · 3.67 KB

speechrecognizerstate.md

File metadata and controls

67 lines (41 loc) · 3.67 KB
-api-id -api-type
T:Windows.Media.SpeechRecognition.SpeechRecognizerState
winrt enum

SpeechRecognizerState

-description

Specifies the state of the speech recognizer.

-enum-fields

-field Idle:0

Indicates that speech recognition is not active and the speech recognizer is not capturing (listening for) audio input.

In this state, SpeechRecognizer.RecognizeAsync, SpeechRecognizer.RecognizeWithUIAsync, SpeechContinuousRecognitionSession.StartAsync, or SpeechRecognizer.CompileConstraintsAsync can be called.

-field Capturing:1

Indicates that the speech recognizer is capturing (listening for) audio input from the user.

Useful for providing dynamic feedback during standard or continuous recognition.

-field Processing:2

Indicates that the speech recognizer is processing (attempting to recognize) audio input from the user. The recognizer is no longer capturing (listening for) audio input from the user.

During standard recognition, the state can occur after the recognizer has stopped capturing audio input and before a recognition result is returned.

During continuous recognition, this state can occur after StopAsync has been called and before the Completed event fires.

Useful for indicating that a user should stop speaking.

-field SoundStarted:3

Indicates that the speech recognizer has detected sound on the audio stream.

Useful for indicating that sound (not necessarily speech) has been detected.

-field SoundEnded:4

Indicates that the speech recognizer no longer detects sound on the audio stream.

Useful for hiding speech recognition UI. However, the recognition session is still active.

-field SpeechDetected:5

Indicates that the speech recognizer has detected speech input on the audio stream.

Useful for indicating that speech has been detected.

-field Paused:6

Only valid for continuous recognition.

Indicates that the speech recognition session is still active, but the speech recognizer is no longer processing (attempting to recognize) audio input. Ongoing audio input is buffered.

In this state, constraints can be added, removed, and compiled.

If one or more constraints are specified when the recognition session is initialized, removing all constraints and resuming recognition will result in an error.

Similarly, if no constraints are specified when the recognition session is initialized, adding constraints and resuming recognition will also result in an error.

-remarks

-examples

-see-also

Windows.Media.SpeechRecognition, Speech interactions, PauseAsync, Resume, SpeechRecognizerStateChangedEventArgs.State, SpeechRecognizer.State, SpeechRecognizer.StateChanged, Speech design guidelines, Speech recognition and speech synthesis sample