inpro.incremental.processor
Class IUBasedFloorTracker

java.lang.Object
  extended by inpro.incremental.PushBuffer
      extended by inpro.incremental.IUModule
          extended by inpro.incremental.processor.AbstractFloorTracker
              extended by inpro.incremental.processor.IUBasedFloorTracker
All Implemented Interfaces:
edu.cmu.sphinx.instrumentation.Resetable, edu.cmu.sphinx.util.props.Configurable

public class IUBasedFloorTracker
extends AbstractFloorTracker


Nested Class Summary
private  class IUBasedFloorTracker.ExpectingInputTimeOutThread
           
private  class IUBasedFloorTracker.TimeOutThread
          supports classes for timing out and sending signals
private  class IUBasedFloorTracker.WordTimeOutThread
          times out and sends signals on an utterance-final word.
 
Nested classes/interfaces inherited from class inpro.incremental.processor.AbstractFloorTracker
AbstractFloorTracker.InternalState, AbstractFloorTracker.Listener, AbstractFloorTracker.Signal
 
Nested classes/interfaces inherited from class inpro.incremental.IUModule
IUModule.RightBuffer
 
Field Summary
private  int anyProsodyTimeout
           
static java.lang.String PROP_ANY_TIMEOUT
           
static java.lang.String PROP_RISING_TIMEOUT
           
static java.lang.String PROP_USE_PROSODY
           
private  int risingTimeout
           
(package private)  IUBasedFloorTracker.TimeOutThread timeOutThread
           
private  boolean useProsody
           
 
Fields inherited from class inpro.incremental.processor.AbstractFloorTracker
ftlisteners, internalState, mostRecentIUs, PROP_STATE_LISTENERS
 
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
IUBasedFloorTracker()
           
 
Method Summary
private  WordIU getPotentiallyFinalWord(java.util.List<WordIU> ius, java.util.List<EditMessage<WordIU>> edits)
          true if the list of IUs ends in <sil> or if the list of IUs has been committed
private  boolean hasNewNonSilWord(java.util.List<EditMessage<WordIU>> edits)
          true if a new non-silence word was added.
 void installInputTimeout(int milliseconds)
          set a timeout to throw a NO_INPUT signal unless something is spoken within the next given number of milliseconds
private  void installNewThread(IUBasedFloorTracker.TimeOutThread tot)
          install a new timeout thread
private  void killThread()
          kill a currently running timeout thread
private  WordIU lastNonSilentWord(java.util.List<WordIU> words)
          the last nonsilent word from words, or null if none exists
 void leftBufferUpdate(java.util.Collection<? extends IU> ius, java.util.List<? extends EditMessage<? extends IU>> edits)
          handles creation (and destruction) of time-out threads.
 void newProperties(edu.cmu.sphinx.util.props.PropertySheet ps)
           
 
Methods inherited from class inpro.incremental.processor.AbstractFloorTracker
isNotInInput, signalListeners
 
Methods inherited from class inpro.incremental.IUModule
getTime, hypChange, logToTedView
 
Methods inherited from class inpro.incremental.PushBuffer
reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_RISING_TIMEOUT

@S4Integer(defaultValue=0)
public static final java.lang.String PROP_RISING_TIMEOUT
See Also:
Constant Field Values

risingTimeout

private int risingTimeout

PROP_ANY_TIMEOUT

@S4Integer(defaultValue=700)
public static final java.lang.String PROP_ANY_TIMEOUT
See Also:
Constant Field Values

anyProsodyTimeout

private int anyProsodyTimeout

PROP_USE_PROSODY

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

useProsody

private boolean useProsody

timeOutThread

IUBasedFloorTracker.TimeOutThread timeOutThread
Constructor Detail

IUBasedFloorTracker

public IUBasedFloorTracker()
Method Detail

newProperties

public void newProperties(edu.cmu.sphinx.util.props.PropertySheet ps)
                   throws edu.cmu.sphinx.util.props.PropertyException
Specified by:
newProperties in interface edu.cmu.sphinx.util.props.Configurable
Overrides:
newProperties in class AbstractFloorTracker
Throws:
edu.cmu.sphinx.util.props.PropertyException
See Also:
AbstractFloorTracker.newProperties(edu.cmu.sphinx.util.props.PropertySheet)

installInputTimeout

public void installInputTimeout(int milliseconds)
set a timeout to throw a NO_INPUT signal unless something is spoken within the next given number of milliseconds

Parameters:
milliseconds - the number of milliseconds until the timeout

leftBufferUpdate

public void leftBufferUpdate(java.util.Collection<? extends IU> ius,
                             java.util.List<? extends EditMessage<? extends IU>> edits)
handles creation (and destruction) of time-out threads. Threads are created on commit (i.e. when VAD thinks that the user is silent) and when a word is added (i.e. when the recognizer thinks, that the user is silent); running threads are destroyed on add of a non-silence word (i.e. when VAD notices that the user speaks and additionally the recognizer thinks that this is not silence)

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

hasNewNonSilWord

private boolean hasNewNonSilWord(java.util.List<EditMessage<WordIU>> edits)
true if a new non-silence word was added.


getPotentiallyFinalWord

private WordIU getPotentiallyFinalWord(java.util.List<WordIU> ius,
                                       java.util.List<EditMessage<WordIU>> edits)
true if the list of IUs ends in <sil> or if the list of IUs has been committed


lastNonSilentWord

private WordIU lastNonSilentWord(java.util.List<WordIU> words)
the last nonsilent word from words, or null if none exists


installNewThread

private void installNewThread(IUBasedFloorTracker.TimeOutThread tot)
install a new timeout thread


killThread

private void killThread()
kill a currently running timeout thread