standup.clouds
Class STANDUPSpeaker

java.lang.Object
  extended by standup.clouds.STANDUPSpeaker

public class STANDUPSpeaker
extends Object

JSAPI-based interface to the FreeTTS synthesizer.


Field Summary
(package private)  Thread speakerThread
           
(package private)  javax.speech.synthesis.Synthesizer synthesizer
           
(package private)  Hashtable<String,javax.speech.synthesis.Voice> voices
           
 
Constructor Summary
STANDUPSpeaker()
          Constructor for Frontend-aware Speaker.
 
Method Summary
 void finish()
           
 Hashtable<String,javax.speech.synthesis.Voice> getVoices()
           
private  String handleExceptions(String string)
           
 void setVoice(javax.speech.synthesis.Voice voice)
           
 void setVolume(float vol)
           
private  void speak(STANDUPSpeakable pesan)
           
 void speak(STANDUPSpeakable[] segments, AnyLock lock)
          Speaks the given segments in a separate STANDUP thread, and wakes the given lock upon completion.
 void speak(STANDUPSpeakable[] segments, boolean waitTilDone)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

synthesizer

javax.speech.synthesis.Synthesizer synthesizer

voices

Hashtable<String,javax.speech.synthesis.Voice> voices

speakerThread

volatile Thread speakerThread
Constructor Detail

STANDUPSpeaker

public STANDUPSpeaker()
Constructor for Frontend-aware Speaker. When speaking, it checks if it is in scanning/switch mode. If it is, it will always wait to complete synthesis before starting again.... it will (eventually?) also wait til Timer-based speech is finished before resuming the scanner!

Parameters:
f -
Method Detail

getVoices

public Hashtable<String,javax.speech.synthesis.Voice> getVoices()

setVoice

public void setVoice(javax.speech.synthesis.Voice voice)

setVolume

public void setVolume(float vol)

handleExceptions

private String handleExceptions(String string)

speak

public void speak(STANDUPSpeakable[] segments,
                  AnyLock lock)
Speaks the given segments in a separate STANDUP thread, and wakes the given lock upon completion.

Parameters:
segments -
lock -

speak

public void speak(STANDUPSpeakable[] segments,
                  boolean waitTilDone)

speak

private void speak(STANDUPSpeakable pesan)

finish

public void finish()