C# Text to Speech Converter

newUser2015

Junior member
  • May 23, 2015
    63
    5
    8
    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).

    • 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.
    Source Code


    [FONT=&quot]using[/FONT][FONT=&quot] SpeechLib;[/FONT]


    [FONT=&quot] public void Speech(string textToSpeech) [/FONT]
    [FONT=&quot] {[/FONT]
    [FONT=&quot] SpeechLib.SpVoice sp = new SpVoice(); [/FONT]
    [FONT=&quot] s.Speak(textToSpeech);[/FONT]
    [FONT=&quot] }

    [FONT=&quot]if you have any questions feel free to ask[/FONT]
    [/FONT]
     
    Last edited: