我在学习语音识别。我用的是System.Speech
这是代码:
var currentCulture = (from r in SpeechRecognitionEngine.InstalledRecognizers()
where r.Culture.Equals(Thread.CurrentThread.CurrentCulture)
select r.Culture).FirstOrDefault();
recognizer = new SpeechRecognitionEngine(currentCulture);我得到的SpeechRecognitionEngine.InstalledRecognizers().Count等于null,因为在调试中,currentCulture等于0。
我发现了一个问题:SpeechRecognitionEngine.InstalledRecognizers returns No recognizer installed
他说他用Microsoft.Speech而不是System.Speech解决了问题。
我在引用->添加引用->程序集中搜索,我没有找到Microsoft.Speech。尝试过Nuget搜索Microsoft.Speech,但没有找到它。
我在谷歌上找到了安装Microsoft.Speech的MSI包:https://www.microsoft.com/en-us/download/details.aspx?id=27225
重新启动我的机器,我仍然在引用中搜索->添加引用->程序集,我没有找到Microsoft.Speech。
现在我的怀疑是:
不一样。
发布于 2019-02-12 14:42:14
请参阅What is the difference between System.Speech.Recognition and Microsoft.Speech.Recognition?
从Vista开始的桌面Windows版本随实现System.Speech的识别器一起提供。这些是“桌面”识别器。他们可以被训练为一个特定的说话者,可以支持更高质量的音频比电话,并提供听写语法。
Micorosft.Speech是一个类似但不同的API,它提供了“服务器”识别功能。这是一个单独的下载。参见"Microsoft https://www.microsoft.com/en-us/download/details.aspx?id=27225。服务器识别允许更高的性能,预期将被多个用户使用(比如在电话系统中),并且它不需要培训。
https://stackoverflow.com/questions/54614798
复制相似问题