edu.cmu.sphinx.frontend
Class DataBlocker

java.lang.Object
  extended by edu.cmu.sphinx.util.props.ConfigurableAdapter
      extended by edu.cmu.sphinx.frontend.BaseDataProcessor
          extended by edu.cmu.sphinx.frontend.DataBlocker
All Implemented Interfaces:
DataProcessor, Configurable

public class DataBlocker
extends BaseDataProcessor

A DataProcessor which wraps incoming DoubleData-objects into equally size blocks of defined length.


Field Summary
static java.lang.String PROP_BLOCK_SIZE_MS
          The SphinxProperty name for the block size of generated data-blocks in milliseconds.
 
Constructor Summary
DataBlocker()
           
DataBlocker(double blockSizeMs)
           
 
Method Summary
 double getBlockSizeMs()
           
 Data getData()
          Returns the processed Data output.
 void newProperties(PropertySheet propertySheet)
          This method is called when this configurable component needs to be reconfigured.
 
Methods inherited from class edu.cmu.sphinx.frontend.BaseDataProcessor
getPredecessor, getTimer, initialize, setPredecessor
 
Methods inherited from class edu.cmu.sphinx.util.props.ConfigurableAdapter
getName, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROP_BLOCK_SIZE_MS

@S4Double(defaultValue=10.0)
public static final java.lang.String PROP_BLOCK_SIZE_MS
The SphinxProperty name for the block size of generated data-blocks in milliseconds.

See Also:
Constant Field Values
Constructor Detail

DataBlocker

public DataBlocker()

DataBlocker

public DataBlocker(double blockSizeMs)
Parameters:
blockSizeMs -
Method Detail

newProperties

public void newProperties(PropertySheet propertySheet)
                   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 ConfigurableAdapter
Parameters:
propertySheet - a property sheet holding the new data
Throws:
PropertyException - if there is a problem with the properties.

getBlockSizeMs

public double getBlockSizeMs()

getData

public Data getData()
             throws DataProcessingException
Description copied from class: BaseDataProcessor
Returns the processed Data output.

Specified by:
getData in interface DataProcessor
Specified by:
getData in class BaseDataProcessor
Returns:
an Data object that has been processed by this DataProcessor
Throws:
DataProcessingException - if a data processor error occurs