<?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>
