开发者

How to control Microsoft Speech Recognition app?

I want to know if it's possible to control "Microsoft Speech Recognition" using c#.

How to control Microsoft Speech Recognition app?

(source: yfrog.com)

Is it possible, for instance, to simulate the click o开发者_运维百科n "On: Listen to everything I say" programmatically using c# or python?


JRobert had the right idea.

If you were using C++, then you would call ISpRecognizer::SetRecoState(SPRST_ACTIVE), and then, if you're running on Windows 7, QI the ISpRecognizer for ISpRecognizer3 and call ISpRecognizer3::SetActiveCategory(NULL) to force the recognizer into the ON state.

But, since you're using C#, you should use System.Speech.Recognition.SpeechRecognizer and set the State property to Listening. (Note that this will not, as far as I know, switch from Sleep to On.)


Here's Microsoft's Speech API documentation, and an example in Python.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜