libsent/src/wav2mfcc/mfcc-core.c

MFCC 特徴量の計算. [詳細]

#include <sent/stddefs.h>
#include <sent/mfcc.h>
mfcc-core.cのインクルード依存関係図

ソースコードを見る。

関数

void make_costbl_hamming (int framesize)
void make_fft_table (int n)
void make_costbl_makemfcc (int fbank_num, int mfcc_dim)
void make_sintbl_wcep (int lifter, int mfcc_dim)
float Mel (int k, float fres)
FBankInfo InitFBank (Value para)
void FreeFBank (FBankInfo fb)
void ZMeanFrame (float *wave, int framesize)
float CalcLogRawE (float *wave, int framesize)
void PreEmphasise (float *wave, Value para)
void Hamming (float *wave, int framesize)
void FFT (float *xRe, float *xIm, int p)
void MakeFBank (float *wave, double *fbank, FBankInfo fb, Value para, float *ssbuf)
float CalcC0 (double *fbank, Value para)
void MakeMFCC (double *fbank, float *mfcc, Value para)
void WeightCepstrum (float *mfcc, Value para)
void WMP_calc_init (Value para, float **bf, int *bflen)
void WMP_calc (float *mfcc, float *bf, Value para, float *ssbuf)
void WMP_calc_fin (float *bf)

変数

static double * costbl_hamming
 Cos table for hamming window.
static int costbl_hamming_len = 0
 Length of above.
static double * costbl_fft
 Cos table for FFT.
static double * sintbl_fft
 Sin table for FFT.
static int tbllen = 0
 Length of above.
static double * costbl_makemfcc
 Cos table for DCT.
static int costbl_makemfcc_len = 0
 Length of above.
static double * sintbl_wcep
 Sin table for cepstrum weighting.
static int sintbl_wcep_len = 0
 Length of above.
static float sqrt2var
 Work area that holds value of sqrt(2.0) / fbank_num.
static double * fbank
 Local buffer to hold filterbank.
static FBankInfo fb
 Local buffer to hold filterbank information.

説明

MFCC 特徴量の計算.

作者:
Akinobu Lee
日付:
Mon Aug 7 11:55:45 2006

ここでは,窓をかけて取り出された音声波形データから MFCC 特徴量を 算出するコア関数が納められています.

Revision
1.3

mfcc-core.c で定義されています。


関数

void make_costbl_hamming ( int  framesize  ) 

Generate table for hamming window.

引数:
framesize [in] window size

mfcc-core.c63 行で定義されています。

参照元 InitFBank(), と new_SS_calculate().

void make_fft_table ( int  n  ) 

Build tables for FFT.

引数:
n [in] 2^n = FFT point

mfcc-core.c94 行で定義されています。

参照元 InitFBank(), と new_SS_calculate().

void make_costbl_makemfcc ( int  fbank_num,
int  mfcc_dim 
)

Generate table for DCT operation to make mfcc from fbank.

引数:
fbank_num [in] number of filer banks
mfcc_dim [in] number of dimensions in MFCC

mfcc-core.c127 行で定義されています。

参照元 InitFBank().

void make_sintbl_wcep ( int  lifter,
int  mfcc_dim 
)

Generate table for weighing cepstrum.

引数:
lifter [in] cepstral liftering coefficient
mfcc_dim [in] number of dimensions in MFCC

mfcc-core.c165 行で定義されています。

参照元 InitFBank().

float Mel ( int  k,
float  fres 
)

Return mel-frequency.

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

mfcc-core.c199 行で定義されています。

参照元 InitFBank().

FBankInfo InitFBank ( Value  para  ) 

Build filterbank information and generate tables for MFCC comptutation.

引数:
para [in] configuration parameters
戻り値:
the generated filterbank information.

mfcc-core.c211 行で定義されています。

参照元 WMP_calc_init().

void FreeFBank ( FBankInfo  fb  ) 

Free FBankInfo.

引数:
fb [in] filterbank information

mfcc-core.c305 行で定義されています。

参照元 WMP_calc_fin().

void ZMeanFrame ( float *  wave,
int  framesize 
)

Remove DC offset per frame

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

mfcc-core.c322 行で定義されています。

参照元 new_SS_calculate(), と WMP_calc().

float CalcLogRawE ( float *  wave,
int  framesize 
)

Calculate Log Raw Energy.

引数:
wave [in] waveform data in the current frame
framesize [in] frame size
戻り値:
the calculated log raw energy.

mfcc-core.c341 行で定義されています。

参照元 WMP_calc().

void PreEmphasise ( float *  wave,
Value  para 
)

Apply pre-emphasis filter.

引数:
wave [i/o] waveform data in the current frame
para [in] configuration parameters

mfcc-core.c360 行で定義されています。

参照元 new_SS_calculate(), と WMP_calc().

void Hamming ( float *  wave,
int  framesize 
)

Apply hamming window.

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

mfcc-core.c375 行で定義されています。

参照元 new_SS_calculate(), と WMP_calc().

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

Apply FFT

引数:
xRe [i/o] real part of waveform
xIm [i/o] imaginal part of waveform
p [in] 2^p = FFT point

mfcc-core.c396 行で定義されています。

参照元 MakeFBank(), と new_SS_calculate().

void MakeFBank ( float *  wave,
double *  fbank,
FBankInfo  fb,
Value  para,
float *  ssbuf 
)

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

引数:
wave [in] waveform data in the current frame
fbank [out] the resulting mel-frequency filterbank
fb [in] filterbank information
para [in] configuration parameters
ssbuf [in] noise spectrum, or NULL if not apply subtraction

mfcc-core.c450 行で定義されています。

参照元 WMP_calc().

float CalcC0 ( double *  fbank,
Value  para 
)

Calculate 0'th cepstral coefficient.

引数:
fbank [in] filterbank
para [in] configuration parameters
戻り値:

mfcc-core.c510 行で定義されています。

参照元 WMP_calc().

void MakeMFCC ( double *  fbank,
float *  mfcc,
Value  para 
)

Apply DCT to filterbank to make MFCC.

引数:
fbank [in] filterbank
mfcc [out] output MFCC vector
para [in] configuration parameters

mfcc-core.c528 行で定義されています。

参照元 WMP_calc().

void WeightCepstrum ( float *  mfcc,
Value  para 
)

Re-scale cepstral coefficients.

引数:
mfcc [i/o] a MFCC vector
para [in] configuration parameters

mfcc-core.c562 行で定義されています。

参照元 WMP_calc().

void WMP_calc_init ( Value  para,
float **  bf,
int *  bflen 
)

Initialize calculation functions and work areas.

引数:
para [in] configuration parameters
bf [out] returns pointer to newly allocated window buffer
bflen [out] length of bf

mfcc-core.c605 行で定義されています。

参照元 WMP_init().

void WMP_calc ( float *  mfcc,
float *  bf,
Value  para,
float *  ssbuf 
)

Calculate MFCC and log energy for one frame. Perform spectral subtraction if ssbuf is specified.

引数:
mfcc [out] buffer to hold the resulting MFCC vector
bf [i/o] work area for FFT
para [in] configuration parameters
ssbuf [in] noise spectrum, or NULL if not using spectral subtraction

mfcc-core.c632 行で定義されています。

参照元 RealTimePipeLine(), と Wav2MFCC().

void WMP_calc_fin ( float *  bf  ) 

Free work area for MFCC computation

引数:
bf [in] window buffer previously allocated by WMP_calc_init()

mfcc-core.c674 行で定義されています。

参照元 Wav2MFCC().


Juliusに対してTue Sep 22 00:15:39 2009に生成されました。  doxygen 1.6.0