ISpeechRecognitionConstraint
ISpeechRecognitionConstraint
ISpeechRecognitionConstraint
ISpeechRecognitionConstraint
Interface
Definition
Represents a constraint for a SpeechRecognizer object.
public : interface ISpeechRecognitionConstraintpublic interface ISpeechRecognitionConstraintPublic Interface ISpeechRecognitionConstraint// You can use this interface in JavaScript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
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.
Properties
IsEnabled IsEnabled IsEnabled IsEnabled
Gets or sets whether the constraint can be used by the SpeechRecognizer object to perform recognition.
public : PlatForm::Boolean IsEnabled { get; set; }public bool IsEnabled { get; set; }Public ReadWrite Property IsEnabled As bool// You can use this property in JavaScript.
- Value
- PlatForm::Boolean bool bool bool
True if a speech recognizer can perform recognition using the constraint; otherwise false.
- See Also
Probability Probability Probability Probability
Gets or sets the weighted value of the constraint.
public : SpeechRecognitionConstraintProbability Probability { get; set; }public SpeechRecognitionConstraintProbability Probability { get; set; }Public ReadWrite Property Probability As SpeechRecognitionConstraintProbability// You can use this property in JavaScript.
- Value
- SpeechRecognitionConstraintProbability SpeechRecognitionConstraintProbability SpeechRecognitionConstraintProbability SpeechRecognitionConstraintProbability
An enumeration that indicates the weighted value of the constraint.
- See Also
Tag Tag Tag Tag
Gets or sets a tag that can be useful for identifying the constraint.
public : PlatForm::String Tag { get; set; }public string Tag { get; set; }Public ReadWrite Property Tag As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
A string representing the tag.
- See Also
Type Type Type Type
Gets the type of the constraint.
public : SpeechRecognitionConstraintType Type { get; }public SpeechRecognitionConstraintType Type { get; }Public ReadOnly Property Type As SpeechRecognitionConstraintType// You can use this property in JavaScript.
- Value
- SpeechRecognitionConstraintType SpeechRecognitionConstraintType SpeechRecognitionConstraintType SpeechRecognitionConstraintType
An enumeration that indicates the type of the constraint.
- See Also