Listen to text message as audio using Notepad

ADVERTISEMENTS

Do you want to listen to text on Windows PC without having to install any special software? You can perform text to speech conversion using good old Notepad.  This method involves basic built-in API called SAPI (Speech Application Programming Interface). With few lines of code, you can write a basic program to code into API and enable computer to narrate the input text.

1. Open notepad & enter following code

Dim message, sapi
message=InputBox(“Gagandeep Sekhon”,”Talk it”)
Set sapi=CreateObject(“sapi.spvoice”)
sapi.Speak message

2. Save Notepad file with .vbs extension

Save the notepad file with .vbs extension (like abc.vbs or xyz.vbs). Then double click to open newly created file with .vbs extension. You will see dialog box as see below.

3. Enter text that you want to listen

Enter any text in the box provided and click OK button. Computer will read out input text (make sure speakers are turned ON). Neat, isn’t it?

If the above code does not work and give error message, then: After you paste the code in notepad [delete ” and again manually type ” ] for all appearance of ” in above code. Alternatively, you can directly copy the code from here.

Also, you can use either of free online tools for text to speech conversion or use free text to speech reader program for your Windows computer.

SHARE
 

Comments

  1. It does not work…..

  2. When I pressed “Okay” nothing spoke….

  3. I get an error when I click on the vbs extension.
    c:\users\xxxxxx\Documents\speakit.vbs
    Line: 2
    Char: 14
    Error: Invaild Character
    Code: 800A0408
    Source: Microsoft VBscript complination error

    • Check the post again.. Code updated..

    • If the above code does not work and give error message, then:
      After you paste the code in notepad [delete ” and again manally type ” ] for all apperance of ” in above code.

      Alternatively, you can directly copy the code from here [http://pastebin.com/m78c14aa9]

  4. mohamedkamil says:

    not working

    • godsendjk says:

      Do not copy the code…
      Open a notepad and type the code…
      Save it using the .vbs extension.
      Works like a charm!!

Add a Comment

*