Make your computer talk with VBScript

From The IT Community
Jump to: navigation, search




Here is a neat little thing for all VBScript coders. With just a few lines you can make your computer say pretty much everything you want to.

While this may seem silly at first, this can be put to good use too, for example to make it easier for people with bad vision to use a program.


So here is the code:

strText = "The IT Community is awesome"
Set objVoice = CreateObject("SAPI.SpVoice")
objVoice.Speak strText


Put these lines in a text file and rename it to talk.vbs. Double click and your computer will start talking :-)

Of course you can change the strText variable to anything you like ;-)



Was this article helpful? Then please donate to keep The IT Community alive...

If you found this article helpful please share it, comment and help others by writing your own article.






Translate this page: