UWP Speech Recognition Topic Constraint property topicHint

109 views Asked by At

When declare a new constraint with the class SpeechRecognitionTopicConstraint i need to specify the scenario and the context(topicHint) in this way.

var constraint = new SpeechRecognitionTopicConstraint(SpeechRecognitionScenario.Dictation, "topicHint");

or

var constraint = new SpeechRecognitionTopicConstraint(SpeechRecognitionScenario.WebSearch, "topicHint");

or

var constraint = new SpeechRecognitionTopicConstraint(SpeechRecognitionScenario.FormFilling, "topicHint");

according to the type of scenario.

My doubt is based on topicHint because in the net I have seen different terms (ex. "dictation","Phone number","Person Name","webSearch","address"), but I have not found information on which ones are available and their actual function in the code.

1

There are 1 answers

0
Ehssan On

You can have a look at the schema for the VCD file https://learn.microsoft.com/en-us/uwp/schemas/voicecommands/voice-command-elements-and-attributes-1-2

There you can find the valid values for subjects, which are:

"Date/Time", "Addresses", "City/State", "Person Names", "Movies", "Music", and "Phone Number"

Also valid values for scenarios are

"Natural Language" "Search" "Short Message" "Dictation" "Commands" "Form Filling"