微软语音识别速度

发布于 2024-11-29 16:05:14 字数 305 浏览 3 评论 0原文

我正在使用微软的语音识别器开发一个小型练习应用程序。对于我正在做的事情,我似乎无法让它足够快地识别单个单词。我希望能够正常说话,系统将从我所说的内容中抓取“关键字”并生成一个字符串。目前我正在使用 5 个单词的自定义语法。红、蓝、黄、绿、橙。例如,如果我说红蓝黄。引擎将抓住“红色”,其余的则消失。

我尝试使用以下方法:

sr.RecognizeAsync(RecognizeMode.Single)

然后在 AudioState 更改为“已停止”后将其重置回单一模式。这速度不够快,无法捕捉到下一个单词。想法?

I am working on a small practice app using Microsoft's speech recognizer. I cannot seem to get it to recognize single words fast enough for what I am doing. I would like to be able to speak normally and the system will grab "keywords" from what I am saying and produce a string. Currently I am using a custom grammar of 5 words. Red, Blue, Yellow, Green, Orange. For example if I say Red blue yellow. The engine will grab "Red" and the rest goes into the void.

I have tried using the following:

sr.RecognizeAsync(RecognizeMode.Single)

Then reset it back to single mode after the AudioState changes to "stopped." This is not fast enough to catch the next word. Thoughts?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

伏妖词 2024-12-06 16:05:14

您是否尝试过PauseRecognizerOnRecognition。我看起来这个函数会在处理之前的音频时缓冲您的音频输入。

来自上面的 MSDN 链接:

当 PauseRecognizerOnRecognition 为 true 时,在执行期间
SpeechRecognized 处理程序语音识别服务暂停并
当新的音频输入到达时对其进行缓冲。一旦 SpeechRecognized 事件发生
处理程序退出,语音识别服务恢复识别并
开始处理来自输入缓冲区的信息。

Have you tried PauseRecognizerOnRecognition. I looks like this function will buffer your audio input while it is processing the previous audio.

From above MSDN link:

When PauseRecognizerOnRecognition is true, during the execution of the
SpeechRecognized handler the speech recognition service pauses and
buffers new audio input as it arrives. Once the SpeechRecognized event
handler exits, the speech recognition service resumes recognition and
starts processing information from its input buffer.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文