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 :)

Comments

Popular posts from this blog

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 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 .

Microsoft Interview - MSP Windows 8 Vertical

Hello Geeks ..It seems to be my return to posting starting today , and i will start by telling about the Interview i just had in Microsoft for MSP - Club . You first need to know that questions are both technical and social , they need to know the real you , weather you understand what you are saying or not , weather you know your limits and able to control it or not . I applied for Microsoft Windows 8 vertical  to be a Microsoft Partner Presenter in my college . MSP Club - Windows 8 Vertical