Posted by
| Nick Gammon
Australia (23,122 posts) Bio
Forum Administrator |
Message
| I have taken the liberty of posting a copy below (I hope that is OK), in case your site goes down, and it illustrates the general idea quite nicely:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!-- Saved on Saturday, November 05, 2005, 8:53 PM -->
<!-- MuClient version 3.68 -->
<!-- Plugin "jfw" generated by Plugin Wizard -->
<muclient>
<plugin
name="jfw"
author="Tyler Spivey"
id="f4a3e103c1d8715efa157b23"
language="VBscript"
purpose="speaks incoming text using jfw."
date_written="2005-11-05 20:53:14"
requires="3.68"
version="1.0"
>
</plugin>
<!-- Triggers -->
<aliases>
<alias
script="togglespeaking"
match="jfw"
enabled="y"
group="speech"
omit_from_command_history="y"
omit_from_log="y"
omit_from_output="y"
sequence="100"
>
</alias>
</aliases>
<triggers>
</triggers>
<!-- Script -->
<script>
<![CDATA[
dim jfwobject
dim speak 'do we want to speak?
sub toggleSpeaking (name, line, wc)
if speak = 1 then
speak = 0
jfwobject.sayString "jfw auto speak off.", 0
else
speak = 1
jfwobject.sayString "jfw auto speak on.",0
end if
end sub
sub OnPluginInstall
set jfwobject = CreateObject("jfwapi")
jfwobject.sayString "jfw speech is ready to rock!",0
speak = 1
end sub
sub OnPluginScreendraw (t, log, line)
if (t = 0 or t = 1) and speak = 1 then
jfwobject.sayString line, 0
end if
end sub
sub OnPluginBroadcast (msg, id, name, text)
if msg = 222 then
jfwobject.sayString text,0
end if
end sub
]]>
</script>
</muclient>
His instructions for using this are:
- Grab the plugin (between the lines above), and put it in mushclient's plugin directory.
- Unzip the jaws api file, and put the jfwapictrl.dll file in a place where it'll be safe from deletion, for example in the windows directory.
File is at: http://allinaccess.com/mc/jfwapi.zip
- Open a command prompt to that directory and run: regsvr32 /s jfwapictrl.dll
- Start mushclient and add the jfw plugin to a world. it should speak. use "jfw" in the comand window to turn it on and off.
That's all there is to it!
In place of jaws you should be able to use SAPI which comes with Windows XP.
Below is a version which does just that:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!-- Saved on Saturday, November 05, 2005, 8:53 PM -->
<!-- MuClient version 3.68 -->
<!-- Plugin "jfw" generated by Plugin Wizard -->
<muclient>
<plugin
name="sapi_speaker"
author="Tyler Spivey"
id="539af5868ca499f001d47b55"
language="VBscript"
purpose="speaks incoming text using jfw."
date_written="2007-04-14"
requires="3.68"
version="1.0"
>
</plugin>
<!-- Triggers -->
<aliases>
<alias
script="togglespeaking"
match="jfw"
enabled="y"
group="speech"
omit_from_command_history="y"
omit_from_log="y"
omit_from_output="y"
sequence="100"
>
</alias>
</aliases>
<triggers>
</triggers>
<!-- Script -->
<script>
<![CDATA[
dim jfwobject
dim speak 'do we want to speak?
sub toggleSpeaking (name, line, wc)
if speak = 1 then
speak = 0
jfwobject.Speak "sapi auto speak off.", 1
else
speak = 1
jfwobject.Speak "sapi auto speak on.",1
end if
end sub
sub OnPluginInstall
set jfwobject = CreateObject("SAPI.SpVoice")
jfwobject.Speak "sapi speaker is ready to rock!",1
speak = 1
end sub
sub OnPluginScreendraw (t, log, line)
if (t = 0 or t = 1) and speak = 1 then
jfwobject.Speak line, 1
end if
end sub
sub OnPluginBroadcast (msg, id, name, text)
if msg = 222 then
jfwobject.Speak text,1
end if
end sub
]]>
</script>
</muclient>
If you install this plugin you don't need to do anything else, as the SAPI is pre-installed (it is on my system anyway), so you don't need to muck around downloading DLLs and registering them. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|