Older Version Newer Version

lbjoseph lbjoseph Oct 5, 2011

Speech Library - lbjoseph lbjoseph

I developed a simple DLL that allows for asynchronous text-to-speech. This means that you can have your program say something out loud, but your program won't have to wait until the computer is finished speaking. This is very useful for interactive speech.

This works on Windows XP, Vista, and Seven. I'm not sure about older systems.

Downloads

You can download the DLL and a demo program here:


Getting Started

Using the speech library is simple. First off, it must be initiated at the start of your program, and finalized at the end:
' When your program is starting:
Call Speech.Begin
 
' When your program is finished:
Call Speech.Finish

Speaking

The text is spoken from a que. If you want the speech engine to immediately say something and forget what it's currently saying, just call Speech.Speak:
Call Speech.Speak "Hello, user!"
If you want the speech engine to finish what it's saying, and then say something else, you can add to the speech que. Just call Speech.SpeakQue:
Speech.SpeakQue "That's all I had to say."

Shutting Up

If you want to stop the computer while it's speaking, just send a blank string to Speech.Speak:
Call Speech.Speak ""