|
Talahaski Enchanter
Joined: 10 Oct 2000 Posts: 656 Location: USA
|
Posted: Sat Apr 19, 2008 11:02 pm
mudreader |
Does anybody have an alternative to the mudreader that will work with CMUD?
|
|
_________________ Talahaski
dartmud.com 2525 |
|
|
|
Dharkael Enchanter
Joined: 05 Mar 2003 Posts: 593 Location: Canada
|
Posted: Sun Apr 20, 2008 1:01 am |
Roll your own using the ActiveX Object Sapi.SpVoice
The interface is described here
If you already have mudreader you probably have the necessary DLLs to make it work.
If not download the Microsoft Text-to-Speech Package
Code: |
#var sapi %comcreate("Sapi.SpVoice")
#call @sapi.Speak("Stuff and Junk") |
It doesn't sound very good out of the box but if you read the first link I gave you can probably tune it till it sounds better.
Good luck.
EDIT:
You'll probably want to change the call to @sapi.Speak to an asynchronous call, that way you're session is not blocked waiting for the voice to finish speaking.
Change the call to Asynchronous by passing 1 as the second param to the Speak method. |
|
_________________ -Dharkael-
"No matter how subtle the wizard, a knife between the shoulder blades will seriously cramp his style." |
|
|
|
Talahaski Enchanter
Joined: 10 Oct 2000 Posts: 656 Location: USA
|
Posted: Sun Apr 20, 2008 10:56 pm |
When i call the alias I get a floating point error
alias xSpeak
Script:
#var sapi %comcreate("Sapi.SpVoice")
#call @sapi.Speak(%params)
I made sure i had all the text to speech stuff installed. |
|
_________________ Talahaski
dartmud.com 2525 |
|
|
|
Dharkael Enchanter
Joined: 05 Mar 2003 Posts: 593 Location: Canada
|
Posted: Sun Apr 20, 2008 11:21 pm |
What do you get when you enter this at the command line?
Code: |
#var sapi %comcreate("Sapi.SpVoice")
#call @sapi.Speak("Test",1) |
|
|
_________________ -Dharkael-
"No matter how subtle the wizard, a knife between the shoulder blades will seriously cramp his style." |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sun Apr 20, 2008 11:31 pm |
You don't need to make the connection every time, too. Change the first line to
#if (!@sapi) {#var sapi %comcreate("Sapi.SpVoice")}
or remove it. |
|
|
|
Talahaski Enchanter
Joined: 10 Oct 2000 Posts: 656 Location: USA
|
Posted: Sun Apr 20, 2008 11:40 pm |
That worked. I changed the alias to include the ,1
#var sapi %comcreate("Sapi.SpVoice")
#call @sapi.Speak(%param,1)
Thanks for all the help! |
|
_________________ Talahaski
dartmud.com 2525 |
|
|
|
|
|