SpeechRecognitionConstraintType SpeechRecognitionConstraintType SpeechRecognitionConstraintType SpeechRecognitionConstraintType SpeechRecognitionConstraintType Enum

Definition

Specifies the grammar definition constraint used for speech recognition.

public : enum class SpeechRecognitionConstraintType
enum class winrt::Windows::Media::SpeechRecognition::SpeechRecognitionConstraintType : int32_t
public enum SpeechRecognitionConstraintType
Public Enum SpeechRecognitionConstraintType
var value = Windows.Media.SpeechRecognition.SpeechRecognitionConstraintType.grammar;
Attributes

Windows 10 requirements

Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Fields

Grammar Grammar Grammar Grammar Grammar 2

A constraint based on a Speech Recognition Grammar Specification (SRGS) grammar file. See SpeechRecognitionGrammarFileConstraint.

List List List List List 1

A constraint based on a list of words or phrases. See SpeechRecognitionListConstraint.

Topic Topic Topic Topic Topic 0

A pre-defined, web-service grammar constraint based on a dictation topic. See SpeechRecognitionTopicConstraint.

VoiceCommandDefinition VoiceCommandDefinition VoiceCommandDefinition VoiceCommandDefinition VoiceCommandDefinition 3

A constraint based on a Voice Command Definition (VCD) file. See SpeechRecognitionVoiceCommandDefinitionConstraint.

Remarks

Constraints, or grammars, define the spoken words and phrases that can be matched by the speech recognizer.

You can specify one of the pre-defined, web-service grammars (see SpeechRecognitionTopicConstraint ) or you can create your own custom grammar (see SpeechRecognitionGrammarFileConstraint, SpeechRecognitionListConstraint, and SpeechRecognitionVoiceCommandDefinitionConstraint ) that is installed with your app.

To use web-service constraints, speech input and dictation support must be enabled in Settings by turning on the "Get to know me" option in the Settings -> Privacy -> Speech, inking, and typing page. See "Recognize speech input" in Speech recognition.

See also