SpeechRecognizerState Enum

Definition

Specifies the state of the speech recognizer.

public enum class SpeechRecognizerState
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
enum class SpeechRecognizerState
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
public enum SpeechRecognizerState
var value = Windows.Media.SpeechRecognition.SpeechRecognizerState.idle
Public Enum SpeechRecognizerState
Inheritance
SpeechRecognizerState
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Fields

Name Value Description
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.

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.

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.

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.

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.

SpeechDetected 5

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

Useful for indicating that speech has been detected.

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.

Applies to

See also