hmi.elckerlyc.speechengine
Class DirectTTSUnit

java.lang.Object
  extended by hmi.elckerlyc.planunit.AbstractPlanUnit
      extended by hmi.elckerlyc.speechengine.AbstractSpeechUnit
          extended by hmi.elckerlyc.speechengine.TTSUnit
              extended by hmi.elckerlyc.speechengine.DirectTTSUnit
All Implemented Interfaces:
PlanUnit, SpeechUnit

public class DirectTTSUnit
extends TTSUnit

Used to speak directly through the TTS system

Author:
welberge

Nested Class Summary
protected  class DirectTTSUnit.MyTTSCallback
           
 
Field Summary
private static org.slf4j.Logger logger
           
private  boolean played
           
private  double systemStartTime
           
 
Fields inherited from class hmi.elckerlyc.speechengine.TTSUnit
bookmarks, curVisime, nextVisime, pegs, prevVisime, ttsBinding, visimeDuration, visimes
 
Fields inherited from class hmi.elckerlyc.speechengine.AbstractSpeechUnit
bmlStartTime, speechText
 
Fields inherited from class hmi.elckerlyc.planunit.AbstractPlanUnit
bmlBlockPeg
 
Constructor Summary
DirectTTSUnit(BMLBlockPeg bbPeg, String text, String id, String bmlId, TTSBinding ttsBin)
           
DirectTTSUnit(BMLBlockPeg bbPeg, String text, String id, String bmlId, TTSBinding ttsBin, Class<? extends Behaviour> behClass)
           
 
Method Summary
protected  TimingInfo getTiming()
           
 void playUnit(double time)
           
protected  void resetUnit(double time)
           
 void sendProgress(double playTime, double time)
          Send progress feedback for all bookmarks passed at playTime.
 void setParameterValue(String parameter, float value)
          Sets a parameter value
 void setParameterValue(String paramId, String value)
          Sets a parameter value
protected  void stopUnit(double time)
           
 
Methods inherited from class hmi.elckerlyc.speechengine.TTSUnit
getAvailableSyncs, getBehaviourClass, getBookmarks, getBookMarkTime, getBookMarkTimePeg, getBookMarkTimePeg, getPreferedDuration, getRelativeTime, getTime, getTimePeg, getVisimes, hasValidTiming, setTimePeg, setTimePeg, setup, setupCache
 
Methods inherited from class hmi.elckerlyc.speechengine.AbstractSpeechUnit
getEndPeg, getEndTime, getStartPeg, getStartTime, sendEndProgress, sendStartProgress, setEnd, setStart
 
Methods inherited from class hmi.elckerlyc.planunit.AbstractPlanUnit
addFeedbackListener, feedback, getBMLBlockPeg, getBMLId, getId, getReplacementGroup, getState, isDone, isLurking, isPlaying, isSubUnit, play, reset, resetUnit, setState, setSubUnit, start, startUnit, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface hmi.elckerlyc.planunit.PlanUnit
addFeedbackListener, feedback, getBMLBlockPeg, getBMLId, getId, getReplacementGroup, getState, isDone, isLurking, isPlaying, isSubUnit, play, reset, setState, start, stop
 

Field Detail

systemStartTime

private double systemStartTime

played

private boolean played

logger

private static org.slf4j.Logger logger
Constructor Detail

DirectTTSUnit

public DirectTTSUnit(BMLBlockPeg bbPeg,
                     String text,
                     String id,
                     String bmlId,
                     TTSBinding ttsBin,
                     Class<? extends Behaviour> behClass)

DirectTTSUnit

public DirectTTSUnit(BMLBlockPeg bbPeg,
                     String text,
                     String id,
                     String bmlId,
                     TTSBinding ttsBin)
Method Detail

playUnit

public void playUnit(double time)
              throws PlayException
Specified by:
playUnit in class AbstractPlanUnit
Throws:
PlayException

getTiming

protected TimingInfo getTiming()
Specified by:
getTiming in class TTSUnit

sendProgress

public void sendProgress(double playTime,
                         double time)
Description copied from class: TTSUnit
Send progress feedback for all bookmarks passed at playTime.

Specified by:
sendProgress in interface SpeechUnit
Specified by:
sendProgress in class TTSUnit
Parameters:
playTime - time since start of the speech unit
time - time since start of BML execution

setParameterValue

public void setParameterValue(String parameter,
                              float value)
Description copied from interface: PlanUnit
Sets a parameter value

Specified by:
setParameterValue in interface PlanUnit
Specified by:
setParameterValue in interface SpeechUnit
Specified by:
setParameterValue in class TTSUnit

setParameterValue

public void setParameterValue(String paramId,
                              String value)
Description copied from interface: PlanUnit
Sets a parameter value


stopUnit

protected void stopUnit(double time)
                 throws PlayException
Specified by:
stopUnit in class AbstractPlanUnit
Throws:
PlayException

resetUnit

protected void resetUnit(double time)