Open Visual Studio.
File-->New Project.
In the dialog box, choose windows forms application.
Form1.cs design page will be open.
After that design a form listed below:
File-->New Project.
In the dialog box, choose windows forms application.
Form1.cs design page will be open.
After that design a form listed below:
Right click on Project-->Add Reference--->Then select System.Speech and click OK.
Then double click on Speak button and write code listed below:
//add new namespace
using System.Speech.Synthesis;
Then :-
private void button1_Click(object sender, EventArgs e)
{
SpeechSynthesizer s = new SpeechSynthesizer();
s.Speak(textBox1.Text);
}
No comments:
Post a Comment