demo.inpro.system.echodm.dm
Class EchoDialogueManager

java.lang.Object
  extended by inpro.incremental.PushBuffer
      extended by inpro.incremental.IUModule
          extended by inpro.incremental.processor.AbstractDialogueManager
              extended by demo.inpro.system.echodm.dm.EchoDialogueManager
All Implemented Interfaces:
edu.cmu.sphinx.instrumentation.Resetable, edu.cmu.sphinx.util.props.Configurable, AbstractFloorTracker.Listener, AudioActionManager.Listener

public class EchoDialogueManager
extends AbstractDialogueManager
implements AbstractFloorTracker.Listener

Echo DM that sends prompts on timeouts repeating last input preceded by a short confirmation with prosodic mirroring of input.

Author:
timo, okko

Nested Class Summary
 
Nested classes/interfaces inherited from class inpro.incremental.IUModule
IUModule.RightBuffer
 
Field Summary
private  DispatchStream audioDispatcher
           
private  java.util.List<WordIU> currentInstallment
           
private  IUList<DialogueActIU> dialogueActIUs
           
private  boolean echo
           
private  IUBasedFloorTracker floorTracker
           
private  InstallmentHistoryViewer ihv
           
private  IUList<InstallmentIU> installments
           
static java.lang.String PROP_DISPATCHER
           
static java.lang.String PROP_ECHO
           
static java.lang.String PROP_FLOOR_TRACKER
           
 
Fields inherited from class inpro.incremental.processor.AbstractDialogueManager
doneQueue, floorSignalQueue, leftBufferQueue, updating
 
Fields inherited from class inpro.incremental.IUModule
iulisteners, logger, PROP_HYP_CHANGE_LISTENERS, PROP_LOG_TO_TEDVIEW, PROP_TEDVIEW_LOG_ADDRESS, PROP_TEDVIEW_LOG_PORT, rightBuffer, tedLogAdapter
 
Constructor Summary
EchoDialogueManager()
           
 
Method Summary
 void floor(AbstractFloorTracker.Signal signal, AbstractFloorTracker floorManager)
          Listens for floor changes and updates the InformationState
 void leftBufferUpdate(java.util.Collection<? extends IU> ius, java.util.List<? extends EditMessage<? extends IU>> edits)
          Keeps the current installment hypothesis.
 void newProperties(edu.cmu.sphinx.util.props.PropertySheet ps)
          Sets up the DM.
private  void reply(java.lang.String systemUtterance)
          Convenience method that tracks system installments and dialogue acts and produces audio output.
 void reset()
          Resets the DM
 
Methods inherited from class inpro.incremental.processor.AbstractDialogueManager
done, postUpdate
 
Methods inherited from class inpro.incremental.IUModule
getTime, hypChange, logToTedView
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_ECHO

@S4Boolean(defaultValue=true)
public static final java.lang.String PROP_ECHO
See Also:
Constant Field Values

echo

private boolean echo

PROP_DISPATCHER

@S4Component(type=DispatchStream.class)
public static final java.lang.String PROP_DISPATCHER
See Also:
Constant Field Values

audioDispatcher

private DispatchStream audioDispatcher

PROP_FLOOR_TRACKER

@S4Component(type=IUBasedFloorTracker.class)
public static final java.lang.String PROP_FLOOR_TRACKER
See Also:
Constant Field Values

floorTracker

private IUBasedFloorTracker floorTracker

installments

private final IUList<InstallmentIU> installments

dialogueActIUs

private final IUList<DialogueActIU> dialogueActIUs

currentInstallment

private java.util.List<WordIU> currentInstallment

ihv

private InstallmentHistoryViewer ihv
Constructor Detail

EchoDialogueManager

public EchoDialogueManager()
Method Detail

newProperties

public void newProperties(edu.cmu.sphinx.util.props.PropertySheet ps)
                   throws edu.cmu.sphinx.util.props.PropertyException
Sets up the DM.

Specified by:
newProperties in interface edu.cmu.sphinx.util.props.Configurable
Overrides:
newProperties in class IUModule
Throws:
edu.cmu.sphinx.util.props.PropertyException

leftBufferUpdate

public void leftBufferUpdate(java.util.Collection<? extends IU> ius,
                             java.util.List<? extends EditMessage<? extends IU>> edits)
Keeps the current installment hypothesis.

Overrides:
leftBufferUpdate in class AbstractDialogueManager
Parameters:
ius - list of IUs that make up the current hypothesis
edits - a list of edits since the last call

reset

public void reset()
Resets the DM

Specified by:
reset in interface edu.cmu.sphinx.instrumentation.Resetable
Overrides:
reset in class PushBuffer

floor

public void floor(AbstractFloorTracker.Signal signal,
                  AbstractFloorTracker floorManager)
Listens for floor changes and updates the InformationState

Specified by:
floor in interface AbstractFloorTracker.Listener
Overrides:
floor in class AbstractDialogueManager
Parameters:
signal - the signal describing the change in the floor
floorManager - the floor manager itself. in this way a consumer can request e.g. to change timeouts

reply

private void reply(java.lang.String systemUtterance)
Convenience method that tracks system installments and dialogue acts and produces audio output.

Parameters:
systemUtterance - the system utterance