语音识别:大型txt文件语法 [英] Speech Recognition: Large txt file grammar

查看:117
本文介绍了语音识别:大型txt文件语法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

_recognizer.LoadGrammarAsync(new Grammar(new GrammarBuilder(new Choices(File.ReadAllLines(@"Commands.txt")))));
            _recognizer.LoadGrammar(new DictationGrammar());//











我想知道如何用这段代码加载一个大的txt文件:










I want to know how can i load a big txt file with this code:


_recognizer.LoadGrammarAsync(new Grammar(new GrammarBuilder(new Choices(File.ReadAllLines(@"Commands.txt")))));









因为当我写了很多单词表单时无法启动,如果我无法加载大文件文本,我可以让其他txt文件加载到这个代码项目?因为我不想使用这段代码:







Because when i writte a lot of words form doesn't start, if i can't load a large file text, can i make others txt file to load in this code project? because i don't want to use this code:

_recognizer.LoadGrammar(new DictationGrammar());





因为不准确。





谢谢



Because isn't accurate.


Thanks

推荐答案

你是对的,它不准确。但是如果加载大语法,它也会使识别不准确;语法越多越糟糕。一旦你有两个或更多具有相似发音的语法元素,识别就会出错,这样的匹配越多,错误越多。



没有多少你可以这样做,除了找到更好的识别引擎(这样的引擎确实存在),或等到技术总体上变得更有用的东西。 :-)



-SA
You are right, it is not accurate. But if you load big grammar, it also makes the recognition inaccurate; the more the grammar the worse. As soon as you have two or more grammar elements with similar pronunciation, the recognition will make mistakes, the more matches like that, the more mistakes.

There is no much you can do, except finding out better recognition engine (such engines do exist), or waiting until the technology in general grows to something more usable. :-)

—SA


一些在线转换器是在互联网上可用,但没有任何工作。 Exp。



https://www.developerfusion.com/tools/convert/csharp-to-python/



https://www.varycode.com/converter.html



两个都不工作。

这是我的C#代码
Some online converter is available on internet but nothing is working. Exp.

https://www.developerfusion.com/tools/convert/csharp-to-python/

https://www.varycode.com/converter.html

both are not working.
This is my C# code
_recognizer.LoadGrammar(new Grammar(new GrammarBuilder(new Choices(File.ReadAllLines(Properties.Resources.Commands)))));


这篇关于语音识别:大型txt文件语法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆