因此,我希望能够将用户所说的内容输入MIC并进行处理。我知道我可以用这个:
Choices c = new Choices();
c.Add("hello test one two three");
GrammarBuilder builder = new GrammarBuilder();
builder.Append(c);
Grammar g = new Grammar(builder);
g.Name = "CMDS";
reader.LoadGrammar(g);
if (sReco != null)
reader.SpeechRecognized += new EventHandler<SpeechRecognizedEventArgs>(SpeechRecognizedCallBack);
if (sHypoth != null)
reader.SpeechHypothesized += new EventHandler<SpeechHypothesizedEventArgs>(SpeechHypothesizedCallBack);
if (sDetected != null)
reader.SpeechDetected += new EventHandler<SpeechDetectedEventArgs>(SpeechDetectedCallBack);
获得某些词语,但我如何得到用户所说的任何内容。我听说过DictationGrammar,但我似乎无法让它发现我的声音。有人可以帮忙吗?代码示例也会有很多帮助。
感谢。