I program using microsoft speech recognition. I will give an example and it works very well. But if I open speech recognition, the program will always be inside. I want the engine to stop every time it recognizes words. Is it possible.
My code is a bit like this:
_trainer = new SpeechRecognitionEngine();
_trainer.LoadGrammar(new Grammar(new GrammarBuilder(word)));
_trainer.SpeechRecognized += _trainer_SpeechRecognized;
_trainer.SpeechRecognitionRejected += _trainer_SpeechRecognitionRejected;
_trainer.SetInputToDefaultAudioDevice();
_trainer.RecognizeAsync(RecognizeMode.Single);
Thank you for your help.
I tried calling _trainer.Dispose()at the end, but the engine doesn’t work at all and gives me a break.
source
share