public class DiscreteCosineTransform extends BaseDataProcessor
PROP_CEPSTRUM_LENGTHrefers to the dimensionality of the coefficients that are actually returned, defaulting to
13. When the input is mel-spectrum, the vector returned is the MFCC (Mel-Frequency
Cepstral Coefficient) vector, where the 0-th element is the energy value.| Modifier and Type | Field and Description |
|---|---|
protected int |
cepstrumSize |
protected double[][] |
melcosine |
protected int |
numberMelFilters |
static java.lang.String |
PROP_CEPSTRUM_LENGTH
The property for the size of the cepstrum
|
static java.lang.String |
PROP_NUMBER_FILTERS
The property for the number of filters in the filterbank.
|
logger| Constructor and Description |
|---|
DiscreteCosineTransform() |
DiscreteCosineTransform(int numberMelFilters,
int cepstrumSize) |
| Modifier and Type | Method and Description |
|---|---|
protected double[] |
applyMelCosine(double[] melspectrum)
Apply the MelCosine filter to the given melspectrum.
|
protected void |
computeMelCosine()
Compute the MelCosine filter bank.
|
Data |
getData()
Returns the next DoubleData object, which is the mel cepstrum of the input frame.
|
void |
initialize()
Initializes this DataProcessor.
|
void |
newProperties(PropertySheet ps)
This method is called when this configurable component needs to be reconfigured.
|
getPredecessor, setPredecessorgetName, initLogger, toString@S4Integer(defaultValue=40) public static final java.lang.String PROP_NUMBER_FILTERS
@S4Integer(defaultValue=13) public static final java.lang.String PROP_CEPSTRUM_LENGTH
protected int cepstrumSize
protected int numberMelFilters
protected double[][] melcosine
public DiscreteCosineTransform(int numberMelFilters,
int cepstrumSize)
public DiscreteCosineTransform()
public void newProperties(PropertySheet ps) throws PropertyException
ConfigurablenewProperties in interface ConfigurablenewProperties in class ConfigurableAdapterps - a property sheet holding the new dataPropertyException - if there is a problem with the properties.public void initialize()
BaseDataProcessorinitialize in interface DataProcessorinitialize in class BaseDataProcessorpublic Data getData() throws DataProcessingException
getData in interface DataProcessorgetData in class BaseDataProcessorDataProcessingException - if a data processing error occurredprotected void computeMelCosine()
protected double[] applyMelCosine(double[] melspectrum)
melspectrum - the MelSpectrum data