edu.cmu.sphinx.frontend.feature
Class DeltasFeatureExtractor

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

public class DeltasFeatureExtractor
extends BaseDataProcessor

Computes the delta and double delta of input cepstrum (or plp or ...). The delta is the first order derivative and the double delta (a.k.a. delta delta) is the second order derivative of the original cepstrum. They help model the speech signal dynamics. The output data is a FloatData object with a float array of size three times the original cepstrum, formed by the concatenation of cepstra, delta cepstra, and double delta cepstra. The output is the feature vector used by the decoder. Figure 1 shows the arrangement of the output feature data array:


Figure 1: Layout of the returned features.

Suppose that the original cepstrum has a length of N, the first N elements of the feature are just the original cepstrum, the second N elements are the delta of the cepstrum, and the last N elements are the double delta of the cepstrum.

Figure 2 below shows pictorially the computation of the delta and double delta of a cepstrum vector, using the last 3 cepstra and the next 3 cepstra.
Figure 2: Delta and double delta vector computation.

Refering to Figure 2, the delta is computed by subtracting the cepstrum that is two frames behind of the current cepstrum from the cepstrum that is two frames ahead of the current cepstrum. The computation of the double delta is similar. It is computed by subtracting the delta cepstrum one time frame behind from the delta cepstrum one time frame ahead. Replacing delta cepstra with cepstra, this works out to a formula involving the cepstra that are one and three behind and after the current cepstrum.


Field Summary
static java.lang.String PROP_FEATURE_WINDOW
          The name of the SphinxProperty for the window of the DeltasFeatureExtractor.
static int PROP_FEATURE_WINDOW_DEFAULT
          The default value of PROP_FEATURE_WINDOW.
 
Constructor Summary
DeltasFeatureExtractor()
           
 
Method Summary
 Data getData()
          Returns the next Data object produced by this DeltasFeatureExtractor.
 void initialize()
          Initializes this DataProcessor.
 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_FEATURE_WINDOW

@S4Integer(defaultValue=3)
public static final java.lang.String PROP_FEATURE_WINDOW
The name of the SphinxProperty for the window of the DeltasFeatureExtractor.

See Also:
Constant Field Values

PROP_FEATURE_WINDOW_DEFAULT

public static final int PROP_FEATURE_WINDOW_DEFAULT
The default value of PROP_FEATURE_WINDOW.

See Also:
Constant Field Values
Constructor Detail

DeltasFeatureExtractor

public DeltasFeatureExtractor()
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()
Description copied from class: BaseDataProcessor
Initializes this DataProcessor. This is typically called after the DataProcessor has been configured.

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

getData

public Data getData()
             throws DataProcessingException
Returns the next Data object produced by this DeltasFeatureExtractor.

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