Older Version Newer Version

lbjoseph lbjoseph Oct 11, 2011 - "Typos :P"

=Speech Library [[user: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:
[[file:Speech.zip]]

==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:
[[code format="lb"]]
' When your program is starting:
Call Speech.Begin

' When your program is finished:
Call Speech.Finish
[[code]]

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

==Shutting Up== 
If you want to stop the computer while it's speaking, just send a blank string to Speech.Speak:
[[code format="lb"]]
Call Speech.Speak ""
[[code]]