|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthmi.elckerlyc.AbstractPlanner
hmi.elckerlyc.speechengine.TTSPlanner
public class TTSPlanner
| Field Summary | |
|---|---|
private AnimationPlanner |
animationPlanner
|
private FacePlanner |
facePlanner
needed to send visimes for speech! |
private static org.slf4j.Logger |
logger
|
private VerbalPlayer |
player
|
private TTSUnitFactory |
suFactory
|
private static double |
TIMEPEG_TOLERANCE
|
private TTSBinding |
ttsBinding
|
| Constructor Summary | |
|---|---|
TTSPlanner(TTSUnitFactory suf,
VerbalPlayer p,
TTSBinding ttsGen)
|
|
TTSPlanner(TTSUnitFactory suf,
VerbalPlayer p,
TTSBinding ttsBin,
FacePlanner fp,
AnimationPlanner ap)
|
|
| Method Summary | |
|---|---|
List<SyncAndTimePeg> |
addBehaviour(BMLBlockPeg bbPeg,
Behaviour b,
List<TimePegAndConstraint> sacs,
PlanUnit planElement)
Creates a SpeechUnit that satisfies sacs and adds it to the motion plan. |
void |
addExceptionListener(BMLExceptionListener war)
|
private void |
addFaceUnits(BMLBlockPeg bbPeg,
Behaviour beh,
TTSUnit bs)
|
private void |
addJawMovement(BMLBlockPeg bbPeg,
Behaviour beh,
TTSUnit bs)
|
void |
clearAll(double time)
Removes all behaviors from the plan |
private TTSUnit |
createSpeechUnit(BMLBlockPeg bbPeg,
Behaviour b)
|
Set<String> |
getInvalidBehaviours()
Checks if the behavior plan is still consistent (e.g. after modifying the timing of some TimePegs). |
Player |
getPlayer()
Returns the Player for this planner. useful for, e.g., resetting the player of any planner (see BMLRealizer.reset). |
List<Class<? extends Behaviour>> |
getSupportedBehaviours()
|
List<Class<? extends Behaviour>> |
getSupportedDescriptionExtensions()
|
String |
getType()
|
VerbalPlayer |
getVerbalPlayer()
Addition on getPlayer to save on class casting |
String[] |
getVoices()
|
void |
interruptBehaviour(String behaviourId,
String BMLId,
double globalTime)
Interrupts the behavior, sending the appropiate feedback callbacks if the behavior was running, just removes it otherwise. |
private void |
linkBookmarks(TTSUnit su,
List<TimePegAndConstraint> sacs,
double startTime,
Behaviour b)
|
void |
removeAllExceptionListeners()
|
void |
removeBehaviour(String behaviourId,
String BMLId)
Removes behavior with behaviourId and bmlId from the plan Callback behavior is unspecified |
void |
reset()
Resets the player, that is: stops running behavior and returns the player to its startup state (default pose etc) This does not clear any behaviours from the plans. |
PlanUnit |
resolveSynchs(BMLBlockPeg bbPeg,
Behaviour b,
List<TimePegAndConstraint> sacs)
Resolves TimePegs for behavior b, given some known time pegs and constraints |
void |
setParameterValue(String behId,
String bmlId,
String paramId,
float value)
|
void |
setParameterValue(String behId,
String bmlId,
String paramId,
String value)
|
void |
setSpeaker(String speaker)
|
void |
shutdown()
Clean up resources constructed with the planner (e.g. for native stuff, spawned threads, ...). |
| Methods inherited from class hmi.elckerlyc.AbstractPlanner |
|---|
addFeedbackListener, getBehaviours, getEndTime, getFeedbackListeners, interruptBehaviourBlock, removeAllFeedbackListeners, removeFeedbackListener, setBMLBlockState |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface hmi.elckerlyc.Planner |
|---|
addFeedbackListener, getBehaviours, getEndTime, getFeedbackListeners, interruptBehaviourBlock, removeAllFeedbackListeners, removeFeedbackListener, setBMLBlockState |
| Field Detail |
|---|
private static org.slf4j.Logger logger
private VerbalPlayer player
private final TTSBinding ttsBinding
private final TTSUnitFactory suFactory
private static final double TIMEPEG_TOLERANCE
private FacePlanner facePlanner
private AnimationPlanner animationPlanner
| Constructor Detail |
|---|
public TTSPlanner(TTSUnitFactory suf,
VerbalPlayer p,
TTSBinding ttsGen)
public TTSPlanner(TTSUnitFactory suf,
VerbalPlayer p,
TTSBinding ttsBin,
FacePlanner fp,
AnimationPlanner ap)
| Method Detail |
|---|
public String getType()
getType in interface SpeechPlannerpublic void shutdown()
Planner
shutdown in interface Plannershutdown in class AbstractPlannerpublic void setSpeaker(String speaker)
public String[] getVoices()
private TTSUnit createSpeechUnit(BMLBlockPeg bbPeg,
Behaviour b)
throws SpeechUnitPlanningException
SpeechUnitPlanningException
public List<SyncAndTimePeg> addBehaviour(BMLBlockPeg bbPeg,
Behaviour b,
List<TimePegAndConstraint> sacs,
PlanUnit planElement)
throws BehaviourPlanningException
addBehaviour in interface PlannerplanElement - planElement obtained from resolveSynchs, null to create a new planElement
BehaviourPlanningException - if no behavior satisfying sac can be constructed
private void addJawMovement(BMLBlockPeg bbPeg,
Behaviour beh,
TTSUnit bs)
private void addFaceUnits(BMLBlockPeg bbPeg,
Behaviour beh,
TTSUnit bs)
public PlanUnit resolveSynchs(BMLBlockPeg bbPeg,
Behaviour b,
List<TimePegAndConstraint> sacs)
throws BehaviourPlanningException
Planner
resolveSynchs in interface Plannerb - the behaviorsacs - the provided time pegs and constraints, missing constraints are filled out by this method
BehaviourPlanningException - if no behavior satisfying sac can be constructedpublic Set<String> getInvalidBehaviours()
Planner
getInvalidBehaviours in interface Plannerpublic void clearAll(double time)
Planner
clearAll in interface Planner
private void linkBookmarks(TTSUnit su,
List<TimePegAndConstraint> sacs,
double startTime,
Behaviour b)
throws BehaviourPlanningException
BehaviourPlanningException
public void removeBehaviour(String behaviourId,
String BMLId)
Planner
removeBehaviour in interface Planner
public void interruptBehaviour(String behaviourId,
String BMLId,
double globalTime)
Planner
interruptBehaviour in interface Plannerpublic VerbalPlayer getVerbalPlayer()
getVerbalPlayer in interface SpeechPlannerpublic Player getPlayer()
Planner
getPlayer in interface Plannerpublic void addExceptionListener(BMLExceptionListener war)
addExceptionListener in interface Plannerpublic void removeAllExceptionListeners()
removeAllExceptionListeners in interface Plannerpublic List<Class<? extends Behaviour>> getSupportedBehaviours()
getSupportedBehaviours in interface Plannerpublic List<Class<? extends Behaviour>> getSupportedDescriptionExtensions()
getSupportedDescriptionExtensions in interface Plannerpublic void reset()
Planner
reset in interface Planner
public void setParameterValue(String behId,
String bmlId,
String paramId,
float value)
setParameterValue in interface Planner
public void setParameterValue(String behId,
String bmlId,
String paramId,
String value)
setParameterValue in interface Planner
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||