Skip to main content

C# Text To Speech Application Using WPF

Hello Geeks .. This is The First Project I'm Posting About C# WPF ( Windows Presentation Foundation ).
It is just a simple Project That Takes The Text You Write In A Text Box And Spell It by A Male Or Female Voice .. However You Want ..
At The End Of the Post You Will Find A Download Link For The Working Project With It's Source Code Uploaded To Media Fire .

Before You Run To Download The Project and Try it out I need you To Know How I Did It , So When You Are Planning To Implement The Code Yourself , You Wont Feel That I Did Something Magical Or Such .. :)

Steps To Create A TextToSpeech Application : 

  1. Open Visual Studio and Create A New Project From C# List Select WPF Windows Application.
  2. Design The Form by Adding Two Radio Buttons , TextBox and A Button.


  3. From The Project List Click On Add Reference

  4. Find From The List System.Speech

  5. Now Add The Namespace using System.Speech.Synthesis; 
  6. Create instance of Synthesis , Synthesis Sound = new Synthesis();
  7. Add This Code To The btnSpeak_Click Event
            try
            {
                if (RadioMale.IsChecked == true)
                {
                    voice.SelectVoiceByHints(VoiceGender.Male);
                }
                else
                { voice.SelectVoiceByHints(VoiceGender.Female); }

                voice.SpeakAsync(txtToSpeech.Text);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
Now Try It out and Have Fun :) 

Download The Full Project With Source Code : 

Related Posts : 

Best Wishes Everybody :)

Popular posts from this blog

How To Create A Change Password Form in a C# Application

Hello Geeks .. This little post is a free sample C# Windows Form that can be used to change password in a SQL Database .

C# Full Pharmacy Project With Source code

Hello Geeks .. This post is one of our completely Free Projects .. It is a Pharmacy Project that can perform a lot of operations you can also find the (.dll) files for the working Barcode Reader Machines in your country and add it to the project .


How To Create C# Chat Application

Hello Geeks .. Today I gonna show you How to make a Chat Application Using Microsoft C#.NET 5.0 .
You Can Use Older Versions Since there is nothing special in the application that only belongs to C# 5.0 .

This Application Was Created To Allow Two Computers To "Chat" Using IP Addresses Also you Can Open two Clients On The Same Computer and Use Same IP Address But Different Port.. It is simple and Easy to Use And Develop .. I also Uploaded The Full Working Project With It's Source Code On MediaFire.. You Will Find The Link At The End Of the Post :)