At this point I have created a new ASP.NET Empty Web Site. To begin:
Right click the project in your solution explorer.
Select Add --> Reference
Click the COM tab.
Select Microsoft Speech Object Libary.
Add Microsoft Speech Object Libary.
Right click the project in your solution explorer.
Select Add --> web form
Name it ‘TextSpeech.aspx’.
Click add.
Open TextSpeech.aspx up to design mode.
Drag and drop a Textbox onto the web form.
Change the ID property to 'txtspeech'
Change the ID property to ‘btnSpeech’.
Change the Text property to ‘Speak’.
Design page Like this:
Write following code in Speech Button
//import SpeechLib
using SpeechLib;
......
protected void btnSpeech_Click(object sender, EventArgs e)
{
SpVoice spk = new SpVoice();
spk.Speak(TextBox1.Text);
}
0 comments:
Post a Comment