Mercurial > hg > qm-dsp
annotate dsp/mfcc/MFCC.h @ 250:a106e551e9a4
...
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Thu, 10 Jan 2008 15:16:08 +0000 |
parents | |
children | d096a79fa772 |
rev | line source |
---|---|
c@250 | 1 #ifndef _LIB_MFCC_H |
c@250 | 2 #define _LIB_MFCC_H |
c@250 | 3 |
c@250 | 4 #define MFCC 6 |
c@250 | 5 |
c@250 | 6 typedef struct mfcc_t { |
c@250 | 7 |
c@250 | 8 /* Filter bank parameters */ |
c@250 | 9 double lowestFrequency; |
c@250 | 10 int linearFilters; |
c@250 | 11 double linearSpacing; |
c@250 | 12 int logFilters; |
c@250 | 13 double logSpacing; |
c@250 | 14 |
c@250 | 15 /* FFT length */ |
c@250 | 16 int fftSize; |
c@250 | 17 |
c@250 | 18 /* Analysis window length*/ |
c@250 | 19 int windowSize; |
c@250 | 20 |
c@250 | 21 int totalFilters; |
c@250 | 22 |
c@250 | 23 /* Misc. */ |
c@250 | 24 int samplingRate; |
c@250 | 25 int nceps; |
c@250 | 26 |
c@250 | 27 /* MFCC vector */ |
c@250 | 28 double *ceps; |
c@250 | 29 |
c@250 | 30 double **mfccDCTMatrix; |
c@250 | 31 double **mfccFilterWeights; |
c@250 | 32 |
c@250 | 33 /* The analysis window */ |
c@250 | 34 double *window; |
c@250 | 35 |
c@250 | 36 /* For the FFT */ |
c@250 | 37 double* imagIn; // always zero |
c@250 | 38 double* realOut; |
c@250 | 39 double* imagOut; |
c@250 | 40 |
c@250 | 41 /* Set if user want C0 */ |
c@250 | 42 int WANT_C0; |
c@250 | 43 |
c@250 | 44 } mfcc_t; |
c@250 | 45 |
c@250 | 46 extern mfcc_t* init_mfcc(int fftSize, int nceps , int samplingRate, int WANT_C0); |
c@250 | 47 extern int do_mfcc(mfcc_t* mfcc_p, double* frame, int length); |
c@250 | 48 extern void close_mfcc(mfcc_t* mfcc_p); |
c@250 | 49 |
c@250 | 50 #endif |
c@250 | 51 |