Improve Speech Recognition, C#

纵然是瞬间 提交于 2019-12-01 17:07:01

问题


I use System.Speech library to able to recognize speech but it usually recognizes very different.

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?


回答1:


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.




回答2:


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 i.e. the wrong word between two similar sounding words.

This simplified example i.e. 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);



回答3:


The DictationGrammar yields somehow weird results, I tried out different properties of the SpeechRecognitionEngine, barely successful. Try out: SpeechRecognitionEngine.BabbleTimeOut But read about usage first to prevent Errors.



来源:https://stackoverflow.com/questions/5489067/improve-speech-recognition-c-sharp

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