public class MFCC extends java.lang.Object implements AudioProcessor
Constructor and Description |
---|
MFCC(int samplesPerFrame,
float sampleRate,
int amountOfCepstrumCoef,
int amountOfMelFilters,
float lowerFilterFreq,
float upperFilterFreq) |
MFCC(int samplesPerFrame,
int sampleRate) |
Modifier and Type | Method and Description |
---|---|
void |
calculateFilterBanks()
calculates the FFT bin indices
calls: none called by: featureExtraction |
float[] |
cepCoefficients(float[] f)
Cepstral coefficients are calculated from the output of the Non-linear Transformation method
calls: none called by: featureExtraction |
int[] |
getCenterFrequencies() |
float[] |
getMFCC() |
float[] |
magnitudeSpectrum(float[] frame)
computes the magnitude spectrum of the input frame
calls: none called by: featureExtraction |
float[] |
melFilter(float[] bin,
int[] centerFrequencies)
Calculate the output of the mel filter
calls: none called by: featureExtraction |
float[] |
nonLinearTransformation(float[] fbank)
the output of mel filtering is subjected to a logarithm function (natural logarithm)
calls: none called by: featureExtraction |
boolean |
process(AudioEvent audioEvent)
Process the audio event.
|
void |
processingFinished()
Notify the AudioProcessor that no more data is available and processing
has finished.
|
public MFCC(int samplesPerFrame, int sampleRate)
public MFCC(int samplesPerFrame, float sampleRate, int amountOfCepstrumCoef, int amountOfMelFilters, float lowerFilterFreq, float upperFilterFreq)
public boolean process(AudioEvent audioEvent)
AudioProcessor
process
in interface AudioProcessor
audioEvent
- The audio event that contains audio data.public void processingFinished()
AudioProcessor
processingFinished
in interface AudioProcessor
public float[] magnitudeSpectrum(float[] frame)
frame
- Input frame signalpublic final void calculateFilterBanks()
public float[] nonLinearTransformation(float[] fbank)
fbank
- Output of mel filteringpublic float[] melFilter(float[] bin, int[] centerFrequencies)
bin
- The bins.centerFrequencies
- The frequency centers.public float[] cepCoefficients(float[] f)
f
- Output of the Non-linear Transformation methodpublic float[] getMFCC()
public int[] getCenterFrequencies()