SpeechRecognitionConstraintType Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Name | Value | Description |
---|---|---|
Topic | 0 | A pre-defined, web-service grammar constraint based on a dictation topic. See SpeechRecognitionTopicConstraint. |
List | 1 | A constraint based on a list of words or phrases. See SpeechRecognitionListConstraint. |
Grammar | 2 | A constraint based on a Speech Recognition Grammar Specification (SRGS) grammar file. See SpeechRecognitionGrammarFileConstraint. |
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.