Implimenting a Text-to-Speech script.

Posted by Heuwyn on Sun 10 Oct 2004 03:49 PM — 5 posts, 22,838 views.

#0
Back in 2000 for Mushclient 3.00, there was a suggestion (321) for implimenting a text-to-speech feature. Such a feature could be very nice if you wish to get other non-computer things done while listening in on the 'tavern chatter'.

Due to the size and trouble of directly implimenting such a whistle, it was dismissed as a possible feature and a vague reference to a possible scripting solution was made. Unfortunately, I can't make heads or tails of that scripting solution.

Although this feature request was more or less closed 3 years ago, it seems to me that it really hasn't been given a solution that anyone can impliment. Is it possible someone could code a plug-in using Flite (http://www.speech.cs.cmu.edu/flite/) or Festival, and posted somewhere conspicuously?

Sorry if someone's already put something like this together, but searches in the forums haven't revealed anything about it since.


Amended on Sun 10 Oct 2004 03:53 PM by Heuwyn
USA #1
Heres an example using MSAgent
http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=1227

If Flute, or Festival have a scripting interface (I havent looked) and/or are COM objects, then yeah, it can be done.
#2
I gave the script there a try and it almost works. The character can be shown and everything from Mushclient can be piped in using Relaytell into the Agent's word-balloon... unfortunately, it's dead silent. :/ Any idea what I'm doing wrong? The Agents seem to speak when tested on the MS Agent page...
USA #3
In that example, there is a line (cat.think sentence), change the think to speak, and then youll get the words (and text).

You can also change those timer things to DoAfter's, thatll clean it up a bit.
Amended on Mon 11 Oct 2004 07:43 AM by Flannel
Greece #4
Actually that's a bit of overkill for what you're trying to do. As I posted in http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=3804 the code is 2-3 lines. This will do the trick:

    Set vceObject = CreateObject ("Sapi.SpVoice")
    vceObject.Rate = 2 '1 is normal, more is faster
    vceObject.Speak "Initialized engine.", 1


I think this requires SAPI SDK 5 which comes with Microsoft Office XP or you can download it from MS's website for free.