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
 

Add a Comment

*