|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthmi.elckerlyc.planunit.AbstractPlanUnit
hmi.elckerlyc.speechengine.AbstractSpeechUnit
hmi.elckerlyc.speechengine.TTSUnit
public abstract class TTSUnit
| Field Summary | |
|---|---|
private Class<? extends Behaviour> |
behaviourClass
|
protected Collection<Bookmark> |
bookmarks
|
int |
curVisime
|
private double |
duration
|
private static org.slf4j.Logger |
logger
|
int |
nextVisime
|
protected TreeMap<Bookmark,TimePeg> |
pegs
|
int |
prevVisime
|
protected TTSBinding |
ttsBinding
|
double |
visimeDuration
|
protected Collection<Visime> |
visimes
|
| Fields inherited from class hmi.elckerlyc.speechengine.AbstractSpeechUnit |
|---|
bmlStartTime, speechText |
| Fields inherited from class hmi.elckerlyc.planunit.AbstractPlanUnit |
|---|
bmlBlockPeg |
| Constructor Summary | |
|---|---|
TTSUnit(BMLBlockPeg bbPeg,
String text,
String id,
String bmlId,
TTSBinding ttsBin,
Class<? extends Behaviour> behClass)
|
|
| Method Summary | |
|---|---|
List<String> |
getAvailableSyncs()
Get the list of sync ids that can be used in this behavior. |
Class<? extends Behaviour> |
getBehaviourClass()
|
private Bookmark |
getBookMark(String syncId)
|
Collection<Bookmark> |
getBookmarks()
Get the processed bookmarks in the speechtext (call setup before calling this) |
double |
getBookMarkTime(Bookmark b)
|
private double |
getBookMarkTime(String bmid)
|
TimePeg |
getBookMarkTimePeg(Bookmark b)
|
TimePeg |
getBookMarkTimePeg(String bmid)
|
double |
getPreferedDuration()
0 is unknown/persistent |
double |
getRelativeTime(String syncId)
Get the relative timing of this sync id Implementing classes should at least provide valid relative times for the BML sync points |
double |
getTime(String syncId)
Get the global time of sync syncId of the PlanUnit, TimePeg.VALUEUNKNOWN if not known (yet) |
TimePeg |
getTimePeg(String syncId)
null is not set |
protected abstract TimingInfo |
getTiming()
|
Collection<Visime> |
getVisimes()
Get the processed visimes in the speechtext (call setup before calling this) |
boolean |
hasValidTiming()
Checks if the timing of this plan unit is 'valid' (e.g. stuff like start is earlier than end, but also planunit specific stuff like biomechanically possible timing). |
abstract void |
sendProgress(double playTime,
double time)
Send progress feedback for all bookmarks passed at playTime. |
abstract void |
setParameterValue(String paramater,
float value)
Sets a parameter value |
void |
setTimePeg(Bookmark bm,
TimePeg sp)
|
void |
setTimePeg(String syncId,
TimePeg peg)
Assigns a TimePeg to a sync in the PlanUnit |
void |
setup()
Finds relative bookmark timing and prefered duration of the speech unit |
protected void |
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, playUnit, reset, resetUnit, setState, setSubUnit, start, startUnit, stop, stopUnit |
| 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, setParameterValue, setState, start, stop |
| Field Detail |
|---|
protected TTSBinding ttsBinding
private double duration
protected Collection<Bookmark> bookmarks
protected Collection<Visime> visimes
public int prevVisime
public int curVisime
public int nextVisime
public double visimeDuration
private final Class<? extends Behaviour> behaviourClass
protected TreeMap<Bookmark,TimePeg> pegs
private static org.slf4j.Logger logger
| Constructor Detail |
|---|
public TTSUnit(BMLBlockPeg bbPeg,
String text,
String id,
String bmlId,
TTSBinding ttsBin,
Class<? extends Behaviour> behClass)
| Method Detail |
|---|
public abstract void setParameterValue(String paramater,
float value)
PlanUnit
public Class<? extends Behaviour> getBehaviourClass()
public TimePeg getBookMarkTimePeg(String bmid)
public double getBookMarkTime(Bookmark b)
public TimePeg getBookMarkTimePeg(Bookmark b)
private double getBookMarkTime(String bmid)
private Bookmark getBookMark(String syncId)
public double getTime(String syncId)
PlanUnit
getTime in interface PlanUnitgetTime in class AbstractPlanUnitpublic TimePeg getTimePeg(String syncId)
PlanUnit
public void setTimePeg(String syncId,
TimePeg peg)
PlanUnit
public double getRelativeTime(String syncId)
throws RelativeSyncNotFoundException
PlanUnit
getRelativeTime in interface PlanUnitgetRelativeTime in class AbstractPlanUnitRelativeSyncNotFoundExceptionpublic List<String> getAvailableSyncs()
PlanUnit
getAvailableSyncs in interface PlanUnitgetAvailableSyncs in class AbstractPlanUnitpublic boolean hasValidTiming()
PlanUnit
public double getPreferedDuration()
PlanUnit
getPreferedDuration in interface PlanUnitgetPreferedDuration in class AbstractPlanUnit
protected abstract TimingInfo getTiming()
throws SpeechUnitPlanningException
SpeechUnitPlanningException
protected void setupCache()
throws SpeechUnitPlanningException
SpeechUnitPlanningException - if cache setup failed.
public void setup()
throws SpeechUnitPlanningException
SpeechUnitPlanningException
public abstract void sendProgress(double playTime,
double time)
playTime - time since start of the speech unittime - time since start of BML execution
public void setTimePeg(Bookmark bm,
TimePeg sp)
public Collection<Bookmark> getBookmarks()
public Collection<Visime> getVisimes()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||