edu.cmu.sphinx.frontend
Class BaseDataProcessor

java.lang.Object
  extended byedu.cmu.sphinx.frontend.BaseDataProcessor
All Implemented Interfaces:
Configurable, DataProcessor
Direct Known Subclasses:
BatchCMN, DataDumper, DeltasFeatureExtractor, DiscreteCosineTransform, DiscreteFourierTransform, FrameDropper, FrontEnd, LiveCMN, MelFrequencyFilterBank, Microphone, NonSpeechDataFilter, PLPCepstrumProducer, PLPFrequencyFilterBank, Preemphasizer, RaisedCosineWindower, S3FeatureExtractor, SpeechClassifier, SpeechMarker, StreamCepstrumSource, StreamDataSource

public abstract class BaseDataProcessor
extends java.lang.Object
implements DataProcessor

An abstract DataProcessor implementing elements common to all concrete DataProcessors, such as name, predecessor, and timer.


Constructor Summary
BaseDataProcessor()
           
 
Method Summary
abstract  Data getData()
          Returns the processed Data output.
 java.lang.String getName()
          Returns the name of this DataProcessor.
 DataProcessor getPredecessor()
          Returns the predecessor DataProcessor.
 Timer getTimer()
          Returns the timer this DataProcessor uses.
 void initialize()
          Initializes this DataProcessor.
 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.
 void setPredecessor(DataProcessor predecessor)
          Sets the predecessor DataProcessor.
 java.lang.String toString()
          Returns the name of this BaseDataProcessor.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BaseDataProcessor

public BaseDataProcessor()
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
Parameters:
name - the name of the component
registry - the registry for this component
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
Parameters:
ps - a property sheet holding the new data
Throws:
PropertyException - if there is a problem with the properties.

getData

public abstract Data getData()
                      throws DataProcessingException
Returns the processed Data output.

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

initialize

public void initialize()
Initializes this DataProcessor. This is typically called after the DataProcessor has been configured.

Specified by:
initialize in interface DataProcessor

getName

public java.lang.String getName()
Returns the name of this DataProcessor.

Specified by:
getName in interface DataProcessor
Returns:
the name of this DataProcessor

getPredecessor

public DataProcessor getPredecessor()
Returns the predecessor DataProcessor.

Specified by:
getPredecessor in interface DataProcessor
Returns:
the predecessor

getTimer

public Timer getTimer()
Returns the timer this DataProcessor uses.

Returns:
the timer

setPredecessor

public void setPredecessor(DataProcessor predecessor)
Sets the predecessor DataProcessor. This method allows dynamic reconfiguration of the front end.

Specified by:
setPredecessor in interface DataProcessor
Parameters:
predecessor - the new predecessor of this DataProcessor

toString

public java.lang.String toString()
Returns the name of this BaseDataProcessor.

Returns:
the name of this BaseDataProcessor