Microsoft.Speech.Recognition识别听写

时间:2013-03-14 21:48:13

标签: c# .net speech

我正在使用Microssoft.Speech.Recognition识别一些演讲。我安装了SDK v11并且在我尝试将AppendDictation添加到GrammarBuilder之前它工作得很好:

Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US"); 
sre = new SpeechRecognitionEngine(new System.Globalization.CultureInfo("en-US"));

sre.SetInputToDefaultAudioDevice();
GrammarBuilder gb = new GrammarBuilder();
gb.Append("start");
gb.AppendDictation();
gb.Append("end");
Grammar g = new Grammar(gb);
sre.LoadGrammar(g);

它在sre.LoadGrammar(g)行崩溃。

FileNotFound异常

错误文字: 找不到这个语法引用的语法。

我做错了吗?我将非常感谢你的帮助!

1 个答案:

答案 0 :(得分:2)

不幸的是,微软Speech SDK的服务器版本目前不支持听写语法。您应该尝试使用System.Speech.Recognition命名空间而不是Microsoft.Speech.Recognition命名空间。如果尚未安装语音识别,则需要在服务器上安装语音识别。

相关问题