Exception from HRESULT 0x80045006

Sep 12 2011 7:34 AM

When I speak the voice through SpeechLib.dll it is working fine.

To Speak the voice here is the code:

voice.Voice = voice.GetVoices().Item(ddlVoices.SelectedIndex);
voice.Volume = trackBarVolume.Value;
voice.Rate = trackBarSpeed.Value;
speakingText = txtUserInput.Text;
voice.Speak(speakingText, SpeechLib.SpeechVoiceSpeakFlags.SVSFlagsAsync);

In the middle of the speaking text i have Pause the speaking like:

voice.Pause();

After that I want to stop the voice and speak the voice with different senatnce. To stop the voice I have used:

voice.Speak("", SpeechLib.SpeechVoiceSpeakFlags.SVSFPurgeBeforeSpeak);

In this scenario when I call stop method I got the below error:

Exception from HRESULT: 0x80045006

And it take lot of time to give the responce.