Open VS2008…
# Create new windows form project (I have named it talker here).
# Now right click on your Project(Talker in this case) and select add reference.
# Now under COM select Microsoft Speech Object Library and press Ok.
#Now in your win form add 1 menu strip,1 text box and 1 Button(change text property to Talk).
# Now in the menu strip add 2 menus File and Help.Under file add exit.
# Now in the properties of TextBox change the MultiLine property to true.
# Now your form should look somewhat like this.
# Lets add functionality to our form.
# Double click on exit menu in your menu strip.
Now add the following code in the click event handler.
this.Close();
# Now add this at the top of your code
using SpeechLib;
# Now double click on the Talk button in your design. Add the following code
SpVoice voice = new SpVoice(); voice.Speak(textBox1.Text,SpeechVoiceSpeakFlags.SVSFDefault);
# You can add anything you like in the Help menu strip. item. I have added the following
MessageBox.Show(“Just enter the text and press talk”);
# Now press F5 and enter any text and press talk. You will hear your system speaking out the text you entered.
Download the source files here