简体   繁体   English

改进语音识别,C#

[英]Improve Speech Recognition, C#

I use System.Speech library to able to recognize speech but it usually recognizes very different. 我使用System.Speech库来识别语音,但它通常识别出非常不同。

SpeechRecognizer_rec = new SpeechRecognizer();
DictationGrammar grammar = new DictationGrammar();

grammar.SpeechRecognized += new EventHandler<SpeechRecognizedEventArgs>(grammar_SpeechRecognized);
_rec.LoadGrammar(grammar);

How can I improve the recgonition? 如何改善复原? Does it have a relation with Grammer class? 它与Grammer类有关系吗?

You have to limit the model (basically the mapping from speech input to allowed English text output) used by the speech recognition engine to get high confidence output. 您必须限制语音识别引擎使用的模型(基本上是从语音输入到允许的英语文本输出的映射)以获得高置信度输出。 The smaller your model is, the better your results will be in general, since there is less chance for the recognizer picking ie the wrong word between two similar sounding words. 模型越小,结果总体上越好,因为识别器拾取的可能性较小,即两个相似的发声单词之间的错误单词。

This simplified example ie would only be able to recognize the numbers from one to three: 这个简化的例子即只能识别一到三个数字:

SpeechRecognizer rec = new SpeechRecognizer();
Choices c = new Choices();

c.Add("one");
c.Add("two");
c.Add("three");

var gb = new GrammarBuilder(c);
var g = new Grammar(gb);
rec.LoadGrammar(g);

If you can afford to ask users go to the training process that will certainly yield you much better results. 如果你有能力让用户去参加培训过程,这肯定会给你带来更好的结果。 I have used for myself (and I have an accent) and it improved significantly the accuracy of the recognition in my applications. 我已经习惯了(我有一个口音),它在我的应用程序中显着提高了识别的准确性。 At the very least you can try it yourself (Control Panel, Speech Recognition, Train your computer to better understand you). 至少你可以自己尝试(控制面板,语音识别,训练你的电脑以更好地了解你)。 Really, training or reducing the model (or of course using your app in a quiet place with a better microphone) are the only ways to improve the accuracy of your results. 实际上,培训或减少模型(当然,在安静的地方使用更好的麦克风使用您的应用程序)是提高结果准确性的唯一方法。

The DictationGrammar yields somehow weird results, I tried out different properties of the SpeechRecognitionEngine, barely successful. DictationGrammar以某种方式产生奇怪的结果,我尝试了SpeechRecognitionEngine的不同属性,几乎没有成功。 Try out: SpeechRecognitionEngine.BabbleTimeOut But read about usage first to prevent Errors. 试试:SpeechRecognitionEngine.BabbleTimeOut但首先阅读有关使用情况以防止错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM