|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread eu.semaine.components.Component eu.semaine.components.dialogue.interpreters.TurnTakingInterpreter
public class TurnTakingInterpreter
The TurnTakingInterpreter looks at the behaviour of the user and has to decide when is a good moment to start speaking. When this moment is decided the decision is send forward. Input UserStateReceiver('semaine.data.state.user') --> user speaking state and detected emotions AgentStateReceiver('semaine.data.state.agent') --> current character Output AgentStateSender('semaine.data.state.agent') --> take/release turn messages
Nested Class Summary |
---|
Nested classes/interfaces inherited from class eu.semaine.components.Component |
---|
Component.State |
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
static int |
OBADIAH
|
static int |
POPPY
|
static int |
PRUDENCE
|
static int |
SPIKE
|
Fields inherited from class eu.semaine.components.Component |
---|
inputWaiting, isInput, isOutput, log, meta, receivers, senders, state, waitingTime |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
TurnTakingInterpreter()
Constructor of TurnTakingInterpreter Initializes the senders and receivers, and sets the waitingtime for Act() |
Method Summary | |
---|---|
void |
act()
Called every 50ms, reevaluates the current situation and tries to determine if the agent should start talking. |
void |
addDetectedEmotions(StateInfo userInfo)
Reads the received Message and tries to filter out the detected Emotion Events. |
void |
determineAgentTurn()
Determines if the agent should start speaking or not. |
int |
getSpeakingIntentionValue()
Calculates the speaking intention value for the current moment. |
void |
processBackchannel(StateInfo agentInfo)
|
void |
processHeadMovements(StateInfo stateInfo)
|
void |
react(SEMAINEMessage m)
Reads the message, filters out the detected user speaking state and the detected emotions, and tries to determine if the agent should start speaking. |
void |
sendAgentTurnState()
|
void |
setAgentSpeakingState(StateInfo dialogInfo)
Reads the received Message and tries to filter out the detected user speaking state. |
void |
setCharacter(StateInfo agentInfo)
Reads the received Message and tries to filter out a change of character |
void |
setUserSpeakingState(StateInfo userInfo)
Reads the received Message and tries to filter out the detected user speaking state. |
void |
updateCharacter(StateInfo stateInfo)
|
Methods inherited from class eu.semaine.components.Component |
---|
customStartIO, exitRequested, getMeta, hasSystemJustBecomeReady, messageAvailableFrom, requestExit, run |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int POPPY
public static final int PRUDENCE
public static final int SPIKE
public static final int OBADIAH
Constructor Detail |
---|
public TurnTakingInterpreter() throws JMSException
JMSException
Method Detail |
---|
public void react(SEMAINEMessage m) throws JMSException
react
in class Component
JMSException
- if communication with the JMS server goes wrong.public void processHeadMovements(StateInfo stateInfo) throws JMSException
JMSException
public void updateCharacter(StateInfo stateInfo) throws JMSException
JMSException
public void act() throws JMSException
act
in class Component
JMSException
- if communication with the JMS server goes wrong.public void setAgentSpeakingState(StateInfo dialogInfo)
m
- - the received messagepublic void setUserSpeakingState(StateInfo userInfo)
m
- - the received messagepublic void setCharacter(StateInfo agentInfo)
am
- - the received messagepublic void processBackchannel(StateInfo agentInfo)
public void addDetectedEmotions(StateInfo userInfo)
m
- - the received messagepublic void determineAgentTurn() throws JMSException
JMSException
public int getSpeakingIntentionValue()
public void sendAgentTurnState() throws JMSException
JMSException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |