Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 2.5 KB

speechrecognitiontopicconstraint.md

File metadata and controls

30 lines (20 loc) · 2.5 KB
-api-id -api-type
T:Windows.Media.SpeechRecognition.SpeechRecognitionTopicConstraint
winrt class

Windows.Media.SpeechRecognition.SpeechRecognitionTopicConstraint

-description

A pre-defined grammar constraint (specifed by SpeechRecognitionScenario) provided through a web service.

-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 or you can create your own custom grammar (see SpeechRecognitionGrammarFileConstraint, SpeechRecognitionListConstraint, and SpeechRecognitionVoiceCommandDefinitionConstraint) that is installed with your app.

CompileConstraintsAsync must always be called before RecognizeAsync or RecognizeWithUIAsync, even if no constraints are specified in the Constraints property.

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 Settings -> Privacy -> Speech, inking, and typing. For more detail on recognition constraints, see "Recognize speech input" in Speech recognition.

Note

Increase recognition accuracy during a lengthy dictation session by using a SpeechRecognitionListConstraint in conjunction with the SpeechRecognitionTopicConstraint. This lets you provide a set of domain-specific keywords that you think are likely to be used during dictation.

-examples

-see-also

Windows.Media.SpeechRecognition, SpeechRecognitionConstraintType, ISpeechRecognitionConstraint, Speech interactions, Speech recognition and speech synthesis sample