[How to] Create a simple Text To Speech application in Visual Studio

Today we are not posting any reviews, technology gadgets or any tips and tricks, we have introduced a new category called Programming with thenerdjob and we hope that our reader and software developers will enjoy. Working on Visual Studio 2012 we will make small application program which can make a text to speak.

I will guide you how to make an application in Visual Studio 2012 (previous version also works), follow below steps to successfully execute the application which can actually speaks from what is written in the text box.

Step 1: Start Visual Studio 2012 (or any version), Create a new project and name it accordingly, I have named it ‘Text2Speech’.

Step 2: You will be displayed with a Form1, now add a Label, a Text Box and a Button from the toolbox.

Change Label property to “Enter Text and I will Speak”. Also change the Multiline property of the text box to True and rename the Button text to “Speak”.

Step 3: Now right click on the project name from right sidebar and click on Add Reference link. Navigate to the COM tab and select “Microsoft Speech Library” from the list and click OK.

Step 4: After adding the speech reference to your project, now double click on the button to fire the event handler function when the user press Speak button, now write the code as shown below:

For C Sharp (C#)If you have create your project under C# environment then use this code:

Howdy! I know this is sort of off-topic but I had to
ask. Does running a well-established website such as yours require a lot of
work? I am brand new to operating a blog however I do
write in my journal every day. I’d like to start a blog so I will be able to share my personal experience
and feelings online. Please let me know if you have any
kind of ideas or tips for brand new aspiring blog owners.
Appreciate it!