Windows Application

text to speech converter in c#

Text To Speech Converter

How to create text to speech converter in c#

Hello friend’s this is Rashid Hussain come with another video tutorial. In this tutorial I’ll show you how to create text to speech converter app in c# winforms app

Create new windows Form application in visual studio. follow the steps

drag button, RichTextBox and Combobox from toolbox.

In Combobox add two items.

Male and Female for Voice.

Click on Solution Explorer and add references below

System.Speech

Text To Speech Converter app
Add the Code below on Button Click
private void button1_Click(object sender, EventArgs e)
{
SpeechSynthesizer spk = new SpeechSynthesizer();
if (comboBox1.Text=="Male")
{
spk.SelectVoiceByHints(VoiceGender.Male);
}
else if (comboBox1.Text=="Female")
{
spk.SelectVoiceByHints(VoiceGender.Female);
}
spk.Speak(richTextBox1.Text);
}

Video tutorial

Thank you for reading this article. Please don’t forget to subscribe our official YouTube Channel RashiCode

Leave a Reply

Your email address will not be published. Required fields are marked *