net.beadsproject.beads.analysis.featureextractors
Class MFCC
java.lang.Object
net.beadsproject.beads.core.Bead
net.beadsproject.beads.analysis.FeatureExtractor<float[],float[]>
net.beadsproject.beads.analysis.featureextractors.MFCC
public class MFCC
- extends FeatureExtractor<float[],float[]>
MFCC generates mel-frequency cepstral coefficients, an important feature type in music and speech processing. MFCC receives feature data from a MelSpectrum
, and must be set as a listener to a MelSpectrum
, not a pure audio stream, in order to work properly.
Constructor Summary |
MFCC(int numCoeffs)
Instantiates a new MFCC. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MFCC
public MFCC(int numCoeffs)
- Instantiates a new MFCC.
- Parameters:
numCoeffs
- the number of coefficients to generate.
setNumberOfFeatures
public void setNumberOfFeatures(int num)
- Description copied from class:
FeatureExtractor
- Sets the number of features.
- Overrides:
setNumberOfFeatures
in class FeatureExtractor<float[],float[]>
- Parameters:
num
- the new number of features.
process
public void process(float[] melSpectrum)
- Description copied from class:
FeatureExtractor
- Process some data of type P (specified by the class def). This method must be overidden by implementing classes.
- Specified by:
process
in class FeatureExtractor<float[],float[]>
- Parameters:
melSpectrum
- the data.
addListener
public void addListener(FeatureExtractor<?,float[]> fe)
- Adds a listener to this MFCC.
- Parameters:
fe
- the listener.