using System.Windows.Forms; using System.Speech.Synthesis; namespace Sample { public partial Class Form1: Form { public SpeechSynthesizer _synthesizer; private void btnSpeak_Click(object sender, EventArgs e) { _synthesizer = new SpeechSynthesizer(); var words = txtWords.Text; _synthesizer.Speak(words); } public Form1() { InitializeComponent(); } } }