hmi.elckerlyc.speechengine
Class WavTTSUnit
java.lang.Object
hmi.elckerlyc.planunit.AbstractPlanUnit
hmi.elckerlyc.speechengine.AbstractSpeechUnit
hmi.elckerlyc.speechengine.TTSUnit
hmi.elckerlyc.speechengine.WavTTSUnit
- All Implemented Interfaces:
- PlanUnit, SpeechUnit
public class WavTTSUnit
- extends TTSUnit
Plans speach by generating a .wav file, then uses that .wav file to generate the speech
- Author:
- welberge
| Methods inherited from class hmi.elckerlyc.speechengine.TTSUnit |
getAvailableSyncs, getBehaviourClass, getBookmarks, getBookMarkTime, getBookMarkTimePeg, getBookMarkTimePeg, getPreferedDuration, getRelativeTime, getTime, getTimePeg, getVisimes, hasValidTiming, setTimePeg, setTimePeg, setup |
| Methods inherited from class hmi.elckerlyc.planunit.AbstractPlanUnit |
addFeedbackListener, feedback, getBMLBlockPeg, getBMLId, getId, getReplacementGroup, getState, isDone, isLurking, isPlaying, isSubUnit, play, reset, setState, setSubUnit, start, 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 |
wavUnit
protected WavUnit wavUnit
tempFile
private File tempFile
progressHandled
private ArrayList<Bookmark> progressHandled
logger
private static org.slf4j.Logger logger
WavTTSUnit
public WavTTSUnit(BMLBlockPeg bbPeg,
String text,
String id,
String bmlId,
TTSBinding ttsBin,
Class<? extends Behaviour> behClass)
WavTTSUnit
public WavTTSUnit(BMLBlockPeg bbPeg,
String text,
String id,
String bmlId,
TTSBinding ttsBin)
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 unittime - time since start of BML execution
playUnit
public void playUnit(double time)
throws SpeechUnitPlayException
- Specified by:
playUnit in class AbstractPlanUnit
- Throws:
SpeechUnitPlayException
stopUnit
public void stopUnit(double time)
- Specified by:
stopUnit in class AbstractPlanUnit
resetUnit
public void resetUnit()
- Overrides:
resetUnit in class AbstractPlanUnit
startUnit
protected void startUnit(double time)
throws PlayException
- Description copied from class:
AbstractPlanUnit
- Starts the PlanUnit, is only called once at start
- Overrides:
startUnit in class AbstractPlanUnit
- Parameters:
time - global start time
- Throws:
PlayException
setupCache
protected void setupCache()
throws SpeechUnitPlanningException
- Overrides:
setupCache in class TTSUnit
- Throws:
SpeechUnitPlanningException - if cache setup failed.
getTiming
protected TimingInfo getTiming()
throws SpeechUnitPlanningException
- Specified by:
getTiming in class TTSUnit
- Throws:
SpeechUnitPlanningException
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