Matching wildcard/dictation in Microsoft Speech Grammar

最后都变了- 提交于 2019-12-11 04:44:33

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!