How to Convert Text into Speech

Create a new Windows application, design the form as follows:


When entering text into the textbox and the speak button is clicked then this program will read out the text in the textbox.


After designing the form, the button click event must be raised. Use the following code for it.


string text = textBox1.Text;

Create a new class with the name SpeechController and add the following namespaces:

using System.Speech.Synthesis;
using System.Speech.AudioFormat;

And use the following code for it:

public static SpeechController Instance
    get {return msInstace; }

private static SpeechController msInstace=new SpeechController();
private SpeechSynthesizer mySys = new SpeechSynthesizer();

public void Speech(string text)