1

How do I STOP the System.Speech.Synthesi.Syntheziser? There are build in methods for pausing and resuming,but I don't see how to totally stop the engine. when I use the SpeakAsyncCancel method the state property indicated that the Synthesizer is still speaking.

Do I have to use threads or do I not understand?.

nathan gonzalez
  • 11,817
  • 4
  • 41
  • 57

2 Answers2

0

I had the same problem and figured it out after some goggling. The Synthesizer is multi-threaded, therefore they must only be ONE instance in the program, so make a static one somewhere with a static constructor.

jamie
  • 580
  • 5
  • 16
0

Using SpeakAsyncCancel you need to pass a prompt parameter, for example:

Synthesizer.SpeakAsyncCancel(new Prompt("cancelling now"));

You can use SpeakAsyncCancelAll() as well, and finally dispose:

Synthesizer.SpeakAsyncCancelAll();
Synthesizer.Dispose();
meda
  • 45,103
  • 14
  • 92
  • 122