问题
I'm using Microsoft Speech API to load a grxml grammar:
Grammar grammar = new Grammar(file);
grammar.Enabled = true;
SpeechRecognitionEngine sre = GetEngine();
sre.LoadGrammarAsync(grammar);
Based on MSDN I can not find tag to match a wildcard / spoken text like:
<item>My message is {dictation}</item>
It seems to be availalble with code with a DictationGrammar and appendDictation(). It's also available with WSRMacro XML using * but I do not how to do it in XML ?
The skip text but I need to recognize it.
Am I missing something ?
回答1:
If you're using the Kinect speech engine, you cannot use dictation at all; the engine simply doesn't support it.
For more details, you can look at my answer to this question.
回答2:
For my project SARAH
- I load all XML grammar
- Then I create a dictation grammar
- Some user's action enable/disable the dictation mode
I know there should be a better way to do it since WSRMacro use '*' but I don"t know how to do it.
Might be a clue
来源:https://stackoverflow.com/questions/12101120/matching-wildcard-dictation-in-microsoft-speech-grammar