Quantcast
Channel: The VBScript Network and Systems Administrator's Cafe » undocumented windows
Viewing all articles
Browse latest Browse all 2

Writing scripts that use speech with the Windows Speech API

0
0

I’ve been looking for ways to make a script speak the information it needs to relay to the user just for fun and, unfortunately the only scripts I could find out there were extremely elaborate onces that use the Microsoft Office Agents. While they fit the bill they were annoying and required Microsoft office components to be installed… that just wouldn’t do.

Then I found the Windows Sound API. It doesn’t require anything at all to be installed and it works fine. The script below is simple and easy to implement in your code. Check it out:

strText = “Hello, there…. can you write code?”

Set objVoice = CreateObject(“SAPI.SpVoice”)
objVoice.Speak strText


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images