Text to Voice Application :
in this tutorial we will create a text to voice application by using System.Speech.Synthesis step by step
Step 1:
Start a new Windows form application in C sharp
Step 2:
Go to solution explorer Right-Click on References
Step 3:
Then Click on Add references
Step 4:
Now first Click on .Net Then Click on System.Speech
then hit OK
Now we have added a new reference named System.Speech
Step 5:
Now double click on your form.
now add a new name space using System.Speech.Synthesis;
Step 6:
Now Come back to your form and add a text box and on buttton
set text box property to Multi-line
Step 7:
Now set the form as you wish your form should look like
Step 8:
Double Click on Button 1 to add some code to it
Step 9:
Type the following code under Button 1
SpeechSynthesizer voice = new SpeechSynthesizer();
voice.Speak(textBox1.Text);
Step 10:
Now Run your program and enjoy text to speech application.
Type text in text box and click on button 1. It will speak for you.
Feel free to contact me for any question.






No comments:
Post a Comment