se.chalmers.cs.gf.dialogutil.tts
Class JavaSpeechOutput

java.lang.Object
  extended by se.chalmers.cs.gf.dialogutil.tts.JavaSpeechOutput
All Implemented Interfaces:
java.util.EventListener, TextListener

public class JavaSpeechOutput
extends java.lang.Object
implements TextListener

Outputs text to FreeTTS using the Java Speech API.


Constructor Summary
JavaSpeechOutput()
           
 
Method Summary
 void blockingSpeakText(java.lang.String text)
          Speaks a texts, blocking the calling thread until the entire text has been output or the thread has been interrupted.
 void finalize()
           
 void speakText(java.lang.String text)
          Speaks a texts.
 void textEvent(TextEvent e)
          Handle a text event.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaSpeechOutput

public JavaSpeechOutput()
Method Detail

blockingSpeakText

public void blockingSpeakText(java.lang.String text)
Speaks a texts, blocking the calling thread until the entire text has been output or the thread has been interrupted.


speakText

public void speakText(java.lang.String text)
Speaks a texts. Does not block.


textEvent

public void textEvent(TextEvent e)
Description copied from interface: TextListener
Handle a text event.

Specified by:
textEvent in interface TextListener
Parameters:
e - The event object

finalize

public void finalize()
Overrides:
finalize in class java.lang.Object