13-Text to Speech

0
532

The .Net Framework 3.5 produce set of speech libraries for developing a Text-to-Speech. The System.Speech.Synthesis namespace provides a lot of classes for Text-to-Speech just like SpeechSynthesizer, VoiceInfoInstalledVoice and many more.
Here’s the example on how to create a Text-to-Speech application:

 

  1. Open the Visual Basic, select “File” on the menu, hit new and create a new project.
    01_helloworld
  2. The New Project dialog will appear.
    text2speech1
    Select “windows” in the project types, hit the “windows form application” in the templates and name your project “TextToSpeech” then hit “ok“.
  3. Design the form this way. See it Below.
    text2speech22
  4. You need to add System.Speech for the reference of the program.
    text2speech3
  5. Double click the form and add this simple namespace for your imports.
  6. double click the button to fire the click event handler of it. Do the following code to declare and instantiate an speech object.
  7. Call the SpeakAsync  method of the object passing in a string containing the text we want to speak.
  8. The code in the view code will look like this.

 

Readers might read also:

 

Facebook Comments

LEAVE A REPLY

Please enter your comment!
Please enter your name here

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