edu.cmu.sphinx.frontend.feature
Class FrameDropper

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

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 has new data.
 void register(java.lang.String name, Registry registry)
          Register my properties.
 
Methods inherited from class edu.cmu.sphinx.frontend.BaseDataProcessor
getName, 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

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

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

register

public void register(java.lang.String name,
                     Registry registry)
              throws PropertyException
Description copied from interface: Configurable
Register my properties. This method is called once early in the time of the component, shortly after the component is constructed. This component should register any configuration properties that it needs to register. If this configurable extends another configurable, super.register should also be called

Specified by:
register in interface Configurable
Overrides:
register in class BaseDataProcessor
Throws:
PropertyException

newProperties

public void newProperties(PropertySheet ps)
                   throws PropertyException
Description copied from interface: Configurable
This method is called when this configurable component has new data. The component should first validate the data. If it is bad the component should return false. If the data is good, the component should record the the data internally and return true.

Specified by:
newProperties in interface Configurable
Overrides:
newProperties in class BaseDataProcessor
Throws:
PropertyException

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