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