Click here to Skip to main content
15,886,724 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi,

I have used SpeechLib.dll to Speak the Synthetic Voices. When we call the Speak method some times it take lot of time to speak the voice.

To Speak the voice we have used below code:
C#
voice.Voice = voice.GetVoices().Item(ddlVoices.SelectedIndex);
voice.Volume = trackBarVolume.Value;
voice.Rate = trackBarSpeed.Value;
speakingText = txtUserInput.Text;
voice.Speak(speakingText, SpeechLib.SpeechVoiceSpeakFlags.SVSFlagsAsync);

To Stop the Async speaking voice use below code:
C#
voice.Speak("", SpeechLib.SpeechVoiceSpeakFlags.SVSFPurgeBeforeSpeak);

And in our application we are not playing single sentance, one sentance complete we have to call the Speak method to play the next sentance.

Please suggest how to resolve this issues.
Posted
Updated 11-Sep-11 21:05pm
v2
Comments
Prerak Patel 12-Sep-11 3:05am    
Use code block for code segments.
Sergey Alexandrovich Kryukov 12-Sep-11 23:16pm    
Why using SpeechLib when you can directly use ready-to-use System.Speech assembly, name space System.Speech.Synthesis? I'm not sure it can help performance. I never saw performance problem with it.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900