Follow the below steps.
1. Open Notepad
message = InputBox("Enter your text","Message Box")
set sapi = Createobject("sapi.spvoice")
3.Save it with a file extension as '.vbs' such as ABC.vbs
4. Now open the file, type the text and click ok. you can hear what you typed.