edu.cmu.sphinx.frontend.feature
Class FrameDropper

java.lang.Object
  extended by edu.cmu.sphinx.frontend.BaseDataProcessor
      extended by edu.cmu.sphinx.frontend.feature.FrameDropper
All Implemented Interfaces:
DataProcessor, Configurable

public class FrameDropper
extends BaseDataProcessor

Drops certain feature frames, usually to speed up decoding. For example, if you 'dropEveryNthFrame' is set to 2, it will drop every other feature frame. If you set 'replaceNthWithPrevious' to 3, then you replace with 3rd frame with the 2nd frame, the 6th frame with the 5th frame, etc..


Field Summary
static java.lang.String PROP_DROP_EVERY_NTH_FRAME
          The SphinxProperty that specifies dropping one in every Nth frame.
static int PROP_DROP_EVERY_NTH_FRAME_DEFAULT
          The default value of PROP_DROP_EVERY_NTH_FRAME.
static java.lang.String PROP_REPLACE_NTH_WITH_PREVIOUS
          The SphinxProperty that specifies whether to replace the Nth frame with the previous frame.
static boolean PROP_REPLACE_NTH_WITH_PREVIOUS_DEFAULT
          The default value of PROP_REPLACE_NTH_WITH_PREVIOUS.
 
Constructor Summary
FrameDropper()
           
 
Method Summary
 Data getData()
          Returns the next Data object from this FrameDropper.
 void initialize()
          Initializes this FrameDropper.
 void newProperties(PropertySheet ps)
          This method is called when this configurable component needs to be reconfigured.
 
Methods inherited from class edu.cmu.sphinx.frontend.BaseDataProcessor
getPredecessor, getTimer, setPredecessor, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROP_DROP_EVERY_NTH_FRAME

@S4Integer(defaultValue=-1)
public static final java.lang.String PROP_DROP_EVERY_NTH_FRAME
The SphinxProperty that specifies dropping one in every Nth frame. If N=2, we drop every other frame. If N=3, we drop every third frame, etc..

See Also:
Constant Field Values

PROP_DROP_EVERY_NTH_FRAME_DEFAULT

public static final int PROP_DROP_EVERY_NTH_FRAME_DEFAULT
The default value of PROP_DROP_EVERY_NTH_FRAME.

See Also:
Constant Field Values

PROP_REPLACE_NTH_WITH_PREVIOUS

@S4Boolean(defaultValue=false)
public static final java.lang.String PROP_REPLACE_NTH_WITH_PREVIOUS
The SphinxProperty that specifies whether to replace the Nth frame with the previous frame.

See Also:
Constant Field Values

PROP_REPLACE_NTH_WITH_PREVIOUS_DEFAULT

public static final boolean PROP_REPLACE_NTH_WITH_PREVIOUS_DEFAULT
The default value of PROP_REPLACE_NTH_WITH_PREVIOUS.

See Also:
Constant Field Values
Constructor Detail

FrameDropper

public FrameDropper()
Method Detail

newProperties

public void newProperties(PropertySheet ps)
                   throws PropertyException
Description copied from interface: Configurable
This method is called when this configurable component needs to be reconfigured.

Specified by:
newProperties in interface Configurable
Overrides:
newProperties in class BaseDataProcessor
Parameters:
ps - a property sheet holding the new data
Throws:
PropertyException - if there is a problem with the properties.

initialize

public void initialize()
Initializes this FrameDropper.

Specified by:
initialize in interface DataProcessor
Overrides:
initialize in class BaseDataProcessor

getData

public Data getData()
             throws DataProcessingException
Returns the next Data object from this FrameDropper. The Data objects belonging to a single Utterance should be preceded by a DataStartSignal and ended by a DataEndSignal.

Specified by:
getData in interface DataProcessor
Specified by:
getData in class BaseDataProcessor
Returns:
the next available Data object, returns null if no Data object is available
Throws:
DataProcessingException - if a data processing error occurs