edu.cmu.sphinx.frontend.util
Class DataDumper

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

public class DataDumper
extends BaseDataProcessor

Dumps the data


Field Summary
static java.lang.String PROP_ENABLE
          The Sphinx property that specifies whether data dumping is enabled
static boolean PROP_ENABLE_DEFAULT
          The default value of PROP_ENABLE.
static java.lang.String PROP_OUTPUT_FORMAT
          The Sphinx property that specifies the format of the output.
static java.lang.String PROP_OUTPUT_FORMAT_DEFAULT
          The default value of PROP_OUTPUT_FORMAT.
static java.lang.String PROP_OUTPUT_SIGNALS
          The Sphinx property that enables the output of signals.
static boolean PROP_OUTPUT_SIGNALS_DEFAULT
          The default value of PROP_OUTPUT_SIGNALS.
 
Constructor Summary
DataDumper()
           
 
Method Summary
 Data getData()
          Reads and returns the next Data object from this DataProcessor, return null if there is no more audio data.
 void initialize()
          Constructs a DataDumper
 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_ENABLE

public static final java.lang.String PROP_ENABLE
The Sphinx property that specifies whether data dumping is enabled

See Also:
Constant Field Values

PROP_ENABLE_DEFAULT

public static final boolean PROP_ENABLE_DEFAULT
The default value of PROP_ENABLE.

See Also:
Constant Field Values

PROP_OUTPUT_FORMAT

public static final java.lang.String PROP_OUTPUT_FORMAT
The Sphinx property that specifies the format of the output.

See Also:
Constant Field Values

PROP_OUTPUT_FORMAT_DEFAULT

public static final java.lang.String PROP_OUTPUT_FORMAT_DEFAULT
The default value of PROP_OUTPUT_FORMAT.

See Also:
Constant Field Values

PROP_OUTPUT_SIGNALS

public static final java.lang.String PROP_OUTPUT_SIGNALS
The Sphinx property that enables the output of signals.

See Also:
Constant Field Values

PROP_OUTPUT_SIGNALS_DEFAULT

public static final boolean PROP_OUTPUT_SIGNALS_DEFAULT
The default value of PROP_OUTPUT_SIGNALS.

See Also:
Constant Field Values
Constructor Detail

DataDumper

public DataDumper()
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()
Constructs a DataDumper

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

getData

public Data getData()
             throws DataProcessingException
Reads and returns the next Data object from this DataProcessor, return null if there is no more audio data.

Specified by:
getData in interface DataProcessor
Specified by:
getData in class BaseDataProcessor
Returns:
the next Data or null if none is available
Throws:
DataProcessingException - if there is a data processing error