Thursday, June 23, 2011

Fun with SAPI

Following vb script pronounces what you write- I tried on my win7 box and I thought it's fun to get started with SAPI. Write the code on Notepad and save the file with extension .vbs.
Dim message, sapi
message=InputBox("What do you want me to say?","Speak to Me")
Set sapi=CreateObject("sapi.spvoice")
sapi.Speak message
view raw sapitest.vbs hosted with ❤ by GitHub

Then clicking the vb script file will show you the following window - write what you want to listen on the text box and press ok, did you hear that ? :P

I have some more idea based on it; do you ? Will share once I can create some more fun with it :)

No comments:

Post a Comment