简体   繁体   English

用于Windows应用程序的语音识别

[英]speech recognition for windows application

we are trying to develop a speech recognition application user microsoft .net speech 我们正在尝试开发语音识别应用程序用户microsoft .net演讲

private SpeechRecognizer _sr;

private SpeechSynthesizer _ss;

this automatically opens up windows speech recognition, and so it will try to detect all speech, and work with it, 这会自动打开Windows语音识别,因此会尝试检测所有语音,并使用它,

Is there a way to actually limit this speech recognition to only work with the application that we're building? 有没有办法真正限制这种语音识别只适用于我们正在构建的应用程序? and also, to only to only respond to commands with a certain prefix. 而且,仅仅响应具有特定前缀的命令。 ie. 即。 bob, are you there? 鲍勃,你在吗? bob can you do this? 鲍勃你能做到吗? bob can you do that? 鲍勃,你能做到吗?

您必须使用SpeechRecognitionEngine类。

Just to complete Hamlet... 刚刚完成哈姆雷特...

Yes, use Speech Recognition Engine and use SpeechRecognized event to get the first recognized word, compare it to your defined prefix (like bob) and do whatever you want to do when it's true. 是的,使用语音识别引擎并使用SpeechRecognized事件来获取第一个识别的单词,将其与您定义的前缀(如bob)进行比较,并做出任何您想要做的事情。

Cheers 干杯

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

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