Using Speech with C# and Visual Studio 2013.

NOTE: I used this tutorial with Visual Studio 2017 and working well with the source code.
This example will show you how to use Speech with C# an Visual Studio 2013 to recognition your words, speak your words from your list and also command the exit application.
Create one empty project from File – New Project.
You have now one Form and you will add 3 buttons and one TextBox.
After that will need to select MultiLine by using right click on the arrow of TextBox.
The next image shows you these 3 buttons and TextBox.
Speek C#
You need to activate Speech from Visual Studio 2013 IDE:
Go to the right panel and Add Reference ( use right-click and select it – see next image).
Speek C#
Then select Speech and click Apply – see next image:
Speek C#
All buttons will have the source code, just double click on buttons and will have the functions for all buttons.
Also If you want to rename the buttons just search Properties and then Text and rename buttons or Form title.
I used Speak, Start and Stop for buttons.
I used also one if-else with exit word from the list, to stop the application.
The list will have all words to recognition your words from the list.
You need also to have hardware microphone or portable microphone and also you must activate it under windows.
Now, the source code of your form is this:

Using F7 Buil Solution and then Start Debugging – F5 you will run the application.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.