In Design View
Put one textbox or button
Now go to Solution explorer
Right click on web Root
Select Add New Reference then select the COM tab on the top.
You'll find Microsoft Speech Object Library in the Component Name column.
Double click on Button that you add
Now Add
using SpeechLib;
protected void Button1_Click(object sender, EventArgs e)
{
SpVoiceClass obj = new SpVoiceClass();
obj.Rate = 0;
obj.Volume = 100;
obj.Speak(TextBox1.Text, SpeechVoiceSpeakFlags.SVSFDefault);
}
Done.
Download Source Code

No comments:
Post a Comment