|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcomirva.audio.util.MFCC
public class MFCC
Mel Frequency Cepstrum Coefficients - MFCCs
Description:
Computes the MFCC representation of a pcm signal. The signal is cut into short overlapping frames, and for each frame, a feature vector is is computed, which consists of Mel Frequency Cepstrum Coefficients.
Constructor Summary | |
---|---|
MFCC(float sampleRate)
Creates a new MFCC object with default window size of 512 for the given sample rate. |
|
MFCC(float sampleRate,
int windowSize,
int numberCoefficients,
boolean useFirstCoefficient)
Creates a new MFCC object. 40 mel-filters are place in the range from 20 to 16000 Hz. |
|
MFCC(float sampleRate,
int windowSize,
int numberCoefficients,
boolean useFirstCoefficient,
double minFreq,
double maxFreq,
int numberFilters)
Creates a new MFCC object. 40 mel-filters are place in the range from 20 to 16000 Hz. |
Method Summary | |
---|---|
int |
getWindowSize()
Returns the window size. |
java.util.Vector<double[]> |
process(AudioPreProcessor in)
Performs the transformation of the input data to MFCCs. |
double[][] |
process(double[] input)
Performs the transformation of the input data to MFCCs. |
double[] |
processWindow(double[] window,
int start)
Transforms one window of MFCCs. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MFCC(float sampleRate) throws java.lang.IllegalArgumentException
sampleRate
- float samples per second, must be greater than zero; not
whole-numbered values get rounded
java.lang.IllegalArgumentException
- raised if method contract is violatedpublic MFCC(float sampleRate, int windowSize, int numberCoefficients, boolean useFirstCoefficient) throws java.lang.IllegalArgumentException
sampleRate
- float samples per second, must be greater than zero; not
whole-numbered values get roundedwindowSize
- int size of window; must be 2^n and at least 32numberCoefficients
- int must be grate or equal to 1 and smaller than
the number of filtersuseFirstCoefficient
- boolean indicates whether the first coefficient
of the dct process should be used in the
mfcc feature vector or not
java.lang.IllegalArgumentException
- raised if method contract is violatedpublic MFCC(float sampleRate, int windowSize, int numberCoefficients, boolean useFirstCoefficient, double minFreq, double maxFreq, int numberFilters) throws java.lang.IllegalArgumentException
sampleRate
- float samples per second, must be greater than zero; none
integer values get roundedwindowSize
- int size of window; must be 2^n and at least 32numberCoefficients
- int must be grate or equal to 1 and smaller than
the number of filtersuseFirstCoefficient
- boolean indicates whether the first coefficient
of the dct process should be used in the
mfcc feature vector or notminFreq
- double start of the interval to place the mel-filters inmaxFreq
- double end of the interval to place the mel-filters innumberFilters
- int number of mel-filters to place in the interval
java.lang.IllegalArgumentException
- raised if method contract is violatedMethod Detail |
---|
public java.util.Vector<double[]> process(AudioPreProcessor in) throws java.lang.IllegalArgumentException, java.io.IOException
in
- AudioPreProcessor input data is a complete Audio stream, must
have the same sample rate like this sone object,
must not be a null value
java.io.IOException
- if there are any problems regarding the inputstream
java.lang.IllegalArgumentException
- raised if method contract is violatedpublic double[][] process(double[] input) throws java.lang.IllegalArgumentException, java.io.IOException
input
- double[] input data is an array of samples, must be a multiple
of the hop size, must not be a null value
java.io.IOException
- if there are any problems regarding the inputstream
java.lang.IllegalArgumentException
- raised if method contract is violatedpublic int getWindowSize()
public double[] processWindow(double[] window, int start) throws java.lang.IllegalArgumentException
window
- double[] data to be converted, must contain enough data for
one windowstart
- int start index of the window data
java.lang.IllegalArgumentException
- raised if method contract is violated
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |