libsent/src/wav2mfcc/mfcc-core.c File Reference

Compute MFCC parameter vectors. More...

#include <sent/stddefs.h>
#include <sent/mfcc.h>

Go to the source code of this file.

Functions

static void make_costbl_hamming (MFCCWork *w, int framesize)
 Generate table for hamming window.
static void make_fft_table (MFCCWork *w, int n)
 Build tables for FFT.
static void make_costbl_makemfcc (MFCCWork *w, int fbank_num, int mfcc_dim)
 Generate table for DCT operation to make mfcc from fbank.
static void make_sintbl_wcep (MFCCWork *w, int lifter, int mfcc_dim)
 Generate table for weighing cepstrum.
float Mel (int k, float fres)
 Return mel-frequency.
void InitFBank (MFCCWork *w, Value *para)
 Build filterbank information and generate tables for MFCC comptutation.
void FreeFBank (FBankInfo *fb)
 Free FBankInfo.
void ZMeanFrame (float *wave, int framesize)
 Remove DC offset per frame.
float CalcLogRawE (float *wave, int framesize)
 Calculate Log Raw Energy.
void PreEmphasise (float *wave, int framesize, float preEmph)
 Apply pre-emphasis filter.
void Hamming (float *wave, int framesize, MFCCWork *w)
 Apply hamming window.
void FFT (float *xRe, float *xIm, int p, MFCCWork *w)
 Apply FFT.
void MakeFBank (float *wave, MFCCWork *w, Value *para)
 Convert wave -> (spectral subtraction) -> mel-frequency filterbank.
float CalcC0 (MFCCWork *w, Value *para)
 Calculate 0'th cepstral coefficient.
void MakeMFCC (float *mfcc, Value *para, MFCCWork *w)
 Apply DCT to filterbank to make MFCC.
void WeightCepstrum (float *mfcc, Value *para, MFCCWork *w)
 Re-scale cepstral coefficients.
MFCCWorkWMP_work_new (Value *para)
 Setup work area for parameters, values, buffers, tables to compute MFCC vectors, with a given parameter configurations.
void WMP_calc (MFCCWork *w, float *mfcc, Value *para)
 Calculate MFCC and log energy for one frame.
void WMP_free (MFCCWork *w)
 Free all work area for MFCC computation.


Detailed Description

Compute MFCC parameter vectors.

These are core functions to compute MFCC vectors from windowed speech data.

Author:
Akinobu Lee
Date:
Mon Aug 7 11:55:45 2006
Revision
1.1.1.1

Definition in file mfcc-core.c.


Function Documentation

static void make_costbl_hamming ( MFCCWork w,
int  framesize 
) [static]

Generate table for hamming window.

Parameters:
w [i/o] MFCC calculation work area
framesize [in] window size

Definition at line 42 of file mfcc-core.c.

static void make_fft_table ( MFCCWork w,
int  n 
) [static]

Build tables for FFT.

Parameters:
w [i/o] MFCC calculation work area
n [in] 2^n = FFT point

Definition at line 67 of file mfcc-core.c.

static void make_costbl_makemfcc ( MFCCWork w,
int  fbank_num,
int  mfcc_dim 
) [static]

Generate table for DCT operation to make mfcc from fbank.

Parameters:
w [i/o] MFCC calculation work area
fbank_num [in] number of filer banks
mfcc_dim [in] number of dimensions in MFCC

Definition at line 94 of file mfcc-core.c.

static void make_sintbl_wcep ( MFCCWork w,
int  lifter,
int  mfcc_dim 
) [static]

Generate table for weighing cepstrum.

Parameters:
w [i/o] MFCC calculation work area
lifter [in] cepstral liftering coefficient
mfcc_dim [in] number of dimensions in MFCC

Definition at line 127 of file mfcc-core.c.

float Mel ( int  k,
float  fres 
)

Return mel-frequency.

Parameters:
k [in] channel number of filter bank
fres [in] constant value computed by "1.0E7 / (para.smp_period * fb.fftN * 700.0)"
Returns:
the mel frequency.

Definition at line 155 of file mfcc-core.c.

Referenced by InitFBank().

void InitFBank ( MFCCWork w,
Value para 
)

Build filterbank information and generate tables for MFCC comptutation.

Parameters:
w [i/o] MFCC calculation work area
para [in] configuration parameters
Returns:
the generated filterbank information.

Definition at line 169 of file mfcc-core.c.

void FreeFBank ( FBankInfo fb  ) 

Free FBankInfo.

Parameters:
fb [in] filterbank information

Definition at line 243 of file mfcc-core.c.

void ZMeanFrame ( float *  wave,
int  framesize 
)

Remove DC offset per frame.

Parameters:
wave [i/o] waveform data in the current frame
framesize [in] frame size

Definition at line 260 of file mfcc-core.c.

Referenced by new_SS_calculate().

float CalcLogRawE ( float *  wave,
int  framesize 
)

Calculate Log Raw Energy.

Parameters:
wave [in] waveform data in the current frame
framesize [in] frame size
Returns:
the calculated log raw energy.

Definition at line 279 of file mfcc-core.c.

void PreEmphasise ( float *  wave,
int  framesize,
float  preEmph 
)

Apply pre-emphasis filter.

Parameters:
wave [i/o] waveform data in the current frame
framesize [i/o] frame size in samples
preEmph [in] pre-emphasis coef.

Definition at line 299 of file mfcc-core.c.

Referenced by new_SS_calculate().

void Hamming ( float *  wave,
int  framesize,
MFCCWork w 
)

Apply hamming window.

Parameters:
wave [i/o] waveform data in the current frame
framesize [in] frame size
w [i/o] MFCC calculation work area

Definition at line 315 of file mfcc-core.c.

Referenced by new_SS_calculate().

void FFT ( float *  xRe,
float *  xIm,
int  p,
MFCCWork w 
)

Apply FFT.

Parameters:
xRe [i/o] real part of waveform
xIm [i/o] imaginal part of waveform
p [in] 2^p = FFT point
w [i/o] MFCC calculation work area

Definition at line 336 of file mfcc-core.c.

Referenced by new_SS_calculate().

void MakeFBank ( float *  wave,
MFCCWork w,
Value para 
)

Convert wave -> (spectral subtraction) -> mel-frequency filterbank.

Parameters:
wave [in] waveform data in the current frame
w [i/o] MFCC calculation work area
para [in] configuration parameters

Definition at line 388 of file mfcc-core.c.

float CalcC0 ( MFCCWork w,
Value para 
)

Calculate 0'th cepstral coefficient.

Parameters:
w [i/o] MFCC calculation work area
para [in] configuration parameters
Returns:

Definition at line 448 of file mfcc-core.c.

void MakeMFCC ( float *  mfcc,
Value para,
MFCCWork w 
)

Apply DCT to filterbank to make MFCC.

Parameters:
mfcc [out] output MFCC vector
para [in] configuration parameters
w [i/o] MFCC calculation work area

Definition at line 466 of file mfcc-core.c.

void WeightCepstrum ( float *  mfcc,
Value para,
MFCCWork w 
)

Re-scale cepstral coefficients.

Parameters:
mfcc [i/o] a MFCC vector
para [in] configuration parameters
w [i/o] MFCC calculation work area

Definition at line 500 of file mfcc-core.c.

MFCCWork* WMP_work_new ( Value para  ) 

Setup work area for parameters, values, buffers, tables to compute MFCC vectors, with a given parameter configurations.

Parameters:
para [in] configuration parameters
Returns:
pointer to the newly allocated work area.

Definition at line 537 of file mfcc-core.c.

Referenced by j_final_fusion(), and j_mfcccalc_new().

void WMP_calc ( MFCCWork w,
float *  mfcc,
Value para 
)

Calculate MFCC and log energy for one frame.

Perform spectral subtraction if ssbuf is specified.

Parameters:
w [i/o] MFCC calculation work area
mfcc [out] buffer to hold the resulting MFCC vector
para [in] configuration parameters

Definition at line 575 of file mfcc-core.c.

Referenced by RealTimeMFCC(), and Wav2MFCC().

void WMP_free ( MFCCWork w  ) 

Free all work area for MFCC computation.

Parameters:
w [i/o] MFCC calculation work area

Definition at line 617 of file mfcc-core.c.

Referenced by j_mfcccalc_free().


Generated on Tue Dec 18 16:01:41 2007 for Julius by  doxygen 1.5.4