I recommend creating another recognizer object that is always active and it will only recognize your
stop
or
continue speaking
words.
The
stopRecognizer
should then stop the main one.
Here's a code sample:
private SpeechRecognitionEngine stopListener = new SpeechRecognitionEngine(new CultureInfo("en-US"));
private SpeechRecognitionEngine recEngine = new SpeechRecognitionEngine(new CultureInfo("en-US"));
private SpeechSynthesizer speaker = new SpeechSynthesizer();
In the Recognized event of
stopListener
you should make the
SpeechSynthesizer
stop speaking.