Best Industrial Training in C,C++,PHP,Dot Net,Java in Jalandhar

Sunday, 22 December 2013

Text to Speech Application in C#.net


Adding an option for converting text to speech in an application can come in handy in a variety of different situations. So today, i will show you how to build text to speech application in c#.net step by step.
  1. Open Visual C# 2010 Express
  2. Then click on File-->New Project
  3. A dialog box will open, then choose windows forms application.


4. Then click ok.
5. After that design a form listed below:



6. Click on Project-->Add Reference--->Then select System.Speech and click OK.

 

7. Then double click on Speak button and write code listed below:

//Add one Namespace
using System.Speech.Synthesis;

private void button1_Click(object sender, EventArgs e)
        {
            SpeechSynthesizer ss = new SpeechSynthesizer();
            ss.Speak(textBox1.Text);
           
        }

8. Press F5 to execute this application.