views:

73

answers:

1

Hello

I'm creating a program in C# using System.Speech.Recognition that recognizes voice commands and translates them to internal commands for another process.

Is there any for my app to internally control the state of the microphone input? (on/asleep/off) This question is similar to this one but its accepted answer turned to C++ which is beyond my power. The suggested C# method to set the SpeechRecognizer.State property is not working since it is read-only.

The ideal would be if I could hide the Windows Speech microphone control altogether and have my own control inside my app. Really all I need is to control the voice input to my app and let other programs work transparently.

Thanks in advance.

+1  A: 

As far as not relying on the Windows Speech recognizer, switch from using System.Speech.Recognition.SpeechRecognizer to using the System.Speech.Recognition.SpeechRecognitionEngine instead. That allows for better control over the grammars recognized by the engine.

By switching to the SpeechRecognitionEngine it means that the microphone will be listening for whatever grammars you provide the entire time the engine is running. I'm not sure if this is the behavior you want or not, but it sounds to be that way.

Agent_9191
Yes, this seems to solve my problems. Got rid of the pesky toolbar and I can control when and what to listen for. Great!
Staffan E