简体   繁体   English

使用 System.Speech.Recognition 打开 Windows 语音识别

[英]Using System.Speech.Recognition opens Windows Speech Recognition

I tried implementing some simple speech recognition WinForms program in C# like the one described here in Michael Levy answer:我尝试在 C# 中实现一些简单的语音识别 WinForms 程序,就像 Michael Levy 回答中描述的那样:

good Speech recognition API 良好的语音识别 API

The problem i have is that any time i run the program Windows Speech Recognition opens and is also doing stuff based on what i am saying.我遇到的问题是,任何时候我运行程序 Windows 语音识别都会打开,并且会根据我所说的进行操作。 Also when the program starts i have to say "start listening" for speech recognition to work.此外,当程序启动时,我必须说“开始聆听”才能使语音识别工作。

My question is: How can i use speech recognition without having Windows Speech Recognition also act on what i am saying?我的问题是:我如何在没有 Windows 的情况下使用语音识别 语音识别也对我所说的起作用? I don't need Windows Speech Recognition UI to open at all and i need to be able to use recognition without having to say "start listening" before.我根本不需要打开 Windows 语音识别 UI,我需要能够使用识别而不必说“开始收听”。

Thanks for your answers感谢您的回答

Are you sure you are using an inproc recognizer for your application only.你确定你只为你的应用程序使用一个 inproc 识别器。 You do this by instantiating a SpeechRecognitionEngine() in your application.您可以通过在应用程序中实例化 SpeechRecognitionEngine() 来做到这一点。 See SpeechRecognitionEngine Class .请参阅SpeechRecognitionEngine Class I suspect you are instantiating a shared recognizer - SpeechRecognizer Class我怀疑您正在实例化一个共享识别器 - SpeechRecognizer Class

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

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