Text to Sppech Conversion in .NET :

May 11, 2011

Tired of reading book?
Then you can use the Text to Speech feature of .Net to Listen to your favourite book.

Text to Speech Conversion steps are as follows:-

  • First create a windows application in C# or VB.
  • Then add reference of DLL called System.Speech to your project which will help you to speak the content you type.
  • Take one TextBox set it's ID to txtReadMe and Button and set it's text to Speak and ID as btnSpeak and drag on your Form.
  • Write following code on the button Click

  • use following namespaces in the project
using System.Speech;
using System.Speech.Recognition;
using System.Speech.Synthesis;
Protected void btnSpeak_Click(object sender, EventArgs e) {     SpeechSynthesizer synth = new SpeechSynthesizer();     synth.Speak(txtReadMe.Text);     synth.Dispose(); }

Note:-
when developing in asp.net it will work on in testing on your Local computer but will not work on Live Evironment.