C# 语音识别准确替代 DictationGrammar?
我想尝试使用 C# 和 System.Speech.Recognition 开发语音助手程序,因为我真的很喜欢在语法中指定单词时它的准确性,但我遇到了一些困难。
我想做的是,例如,当我说 [bot name] play [song name]
我希望它运行 gui 自动化代码来查找歌曲并播放它。
我的主要问题是我厌倦了使用 DictationGrammar 来实现此目的,但它非常不准确
,而且当我在语法中指定命令 play 以便它可以准确检测命令时,我之后无法真正告诉它捕获任何歌曲名称,因为我必须在代码中指定歌曲名称,但我希望它能够检测到任何歌曲名称,无论名称是什么
我希望我正确解释了问题,如果我没有,请原谅我。
I wanted to try to work on a voice assitant program using C# and System.Speech.Recognition
because I really liked how accurate it was when I specified a word in grammar but I'm having some difficulty.
what I want to do is when I say for example [bot name] play [song name]
I want it to run gui automation code to find the song and play it.
my main problem is that I tired using DictationGrammar
for this but it is very inaccurate
and also when I specify the command play
in the grammar so it can detect the command accurately, I can't really tell it to capture any song name after that, as I have to specify the song name in code but I want it to be able to detect any song name no matter what the name is
I hope that I explained the problem properly, forgive me if I didn't.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
也许这对您有帮助: https://stackoverflow.com/a/22978876/18452174
如果您需要更高的准确性,请尝试使用Windows.Media.SpeechRecognition 而不是 System.Speech.Recognition。
另一种选择是预先搜索所有歌曲(如果您正在播放自己的库)并为您的歌曲创建具体的语法。
Maybe this help you: https://stackoverflow.com/a/22978876/18452174
If you need more accuracy, try using Windows.Media.SpeechRecognition instead System.Speech.Recognition.
Another option is make a previous search of all your songs (if you are playing your own library) and create a concrete grammar for your songs.