SpeechRecognitionConstraintType Enum

Definition

Specifies the grammar definition constraint used for speech recognition.

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

Windows requirements

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

Fields

Grammar 2

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

List 1

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

Topic 0

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

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.

Applies to

See also