| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.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 | 
|---|
| 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 | 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, messageAvailableFrom, requestExit, run | 
| Methods inherited from class java.lang.Thread | 
|---|
| activeCount, checkAccess, 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 | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
public TurnTakingInterpreter()
                      throws javax.jms.JMSException
javax.jms.JMSException| Method Detail | 
|---|
public void react(SEMAINEMessage m)
           throws javax.jms.JMSException
react in class Componentjavax.jms.JMSException - if communication with the JMS server goes wrong.
public void updateCharacter(StateInfo stateInfo)
                     throws javax.jms.JMSException
javax.jms.JMSException
public void act()
         throws javax.jms.JMSException
act in class Componentjavax.jms.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 message
public void determineAgentTurn()
                        throws javax.jms.JMSException
javax.jms.JMSExceptionpublic int getSpeakingIntentionValue()
public void sendAgentTurnState()
                        throws javax.jms.JMSException
javax.jms.JMSException| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||