Use Microsoft Text to Speech

If you have very long text to read and you don't want to read but rather listen to the text, then follow these simple instructions given by me.

Easy to follow steps

  1. Open a notepad, notepad++ or any text editor.
  2. Copy the codes given at code block at the last of this article and paste it into the newly opened file in your text editor.
  3. Save this file with any name with (.vbs) file extension (eg. speak.vbs)
  4. Double click the file and enjoy listening.
  5. Change the content of speech variable and save the file.

Note: You can replace the content of the speech variable with your text that you want to listen

'Author: Siken M Dongol
Dim message, sapi
Dim speech

message=InputBox("What do you want me to say?","Speak","Input box text has limitation, you can not keep long text here. Lets Begin")
Set sapi=CreateObject("sapi.spvoice")
sapi.Speak message

speech = "The computer will start to speak whatever English word that you are going to type in here. I have not tested with very long text. "
speech = speech + "But I guess you can have pretty long sentence as long as the variable can hold. Enjoy listening to what you have just typed. Enjoy Microsoft Speach API (SAPI). "
speech = speech + "This is for handling multiple paragraphs, line breaks can break the vbs file."

sapi.Speak speech
H2
H3
H4
3 columns
2 columns
1 column
Join the conversation now
Logo
Center