Monday, July 5, 2010

Text to speech conversion in C#

In visual studio
Add reference: System.Speech
then header
system.speech.synthesizer;

then inside the button_click:

SpeechSynthesizer s = new SpeechSynthesizer();
s.Speak("The speech goes here whatever you like");

or,
you can use a textbox. Suppose it is textBox1 then,

s.Speak(textBox1.Text);


Enjoy C#

No comments:

Post a Comment