This program will read some text enter by user and convert it in to a speech. For this program you need to add Microsoft speech object library reference to your project. And import SpeechLib namespace (using SpeechLib).
[FONT="]using[/FONT][FONT="] SpeechLib;[/FONT]
[FONT="] public void Speech(string textToSpeech) [/FONT]
[FONT="] {[/FONT]
[FONT="] SpeechLib.SpVoice sp = new SpVoice(); [/FONT]
[FONT="] s.Speak(textToSpeech);[/FONT]
[FONT="] }
[FONT="]if you have any questions feel free to ask[/FONT]
[/FONT]
- First open the Microsoft visual studio IDE and make a new project. Then open the solution explore and right click on the references and select add new reference.
- Then select COM tab and select Microsoft speech object library. Now the refrerence is added to your project.
[FONT="]using[/FONT][FONT="] SpeechLib;[/FONT]
[FONT="] public void Speech(string textToSpeech) [/FONT]
[FONT="] {[/FONT]
[FONT="] SpeechLib.SpVoice sp = new SpVoice(); [/FONT]
[FONT="] s.Speak(textToSpeech);[/FONT]
[FONT="] }
[FONT="]if you have any questions feel free to ask[/FONT]
[/FONT]
Last edited:
