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 .

Programming Languages Ranking | Feb 2015 | JavaScript Greatest Performance

This is my second post along the blog speaking about programming languages ranking according to  TIOBE  for software quanlity. Before heading off to speak about the ranking, I would like to point out that this rank is based on the amount of searches and content availiable on the web for each programming language, You can read the full definition of TIOBE index  here .