Julius 4.2
関数
libsent/src/wav2mfcc/mfcc-core.c

MFCC 特徴量の計算 [詳細]

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

ソースコードを見る。

関数

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.
static boolean VTLN_recreate_fbank_cf (float *cf, Value *para, float mlo, float mhi, int maxChan)
 Create fbank center frequency for VTLN.
boolean 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.

説明

MFCC 特徴量の計算

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

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

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


関数

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

Generate table for hamming window.

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

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

参照元 WMP_work_new().

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

Build tables for FFT.

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

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

参照元 WMP_work_new().

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

Generate table for DCT operation to make mfcc from fbank.

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

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

参照元 WMP_work_new().

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

Generate table for weighing cepstrum.

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

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

参照元 WMP_work_new().

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.c161 行で定義されています。

参照元 InitFBank().

static boolean VTLN_recreate_fbank_cf ( float *  cf,
Value para,
float  mlo,
float  mhi,
int  maxChan 
) [static]

Create fbank center frequency for VTLN.

引数:
cf[i/o] center frequency of channels in Mel, will be changed considering VTLN
para[in] analysis parameter
mlo[in] fbank lower bound in Mel
mhi[in] fbank upper bound in Mel
maxChan[in] maximum number of channels

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

参照元 InitFBank().

boolean InitFBank ( MFCCWork w,
Value para 
)

Build filterbank information and generate tables for MFCC comptutation.

引数:
w[i/o] MFCC calculation work area
para[in] configuration parameters
戻り値:
the generated filterbank information.

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

参照元 WMP_work_new().

void FreeFBank ( FBankInfo fb)

Free FBankInfo.

引数:
fb[in] filterbank information

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

参照元 WMP_free().

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.c328 行で定義されています。

参照元 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.c347 行で定義されています。

参照元 WMP_calc().

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

Apply pre-emphasis filter.

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

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

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

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

Apply hamming window.

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

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

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

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

Apply FFT.

引数:
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

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

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

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

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

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

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

参照元 WMP_calc().

float CalcC0 ( MFCCWork w,
Value para 
)

Calculate 0'th cepstral coefficient.

引数:
w[i/o] MFCC calculation work area
para[in] configuration parameters
戻り値:

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

参照元 WMP_calc().

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

Apply DCT to filterbank to make MFCC.

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

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

参照元 WMP_calc().

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

Re-scale cepstral coefficients.

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

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

参照元 WMP_calc().

MFCCWork* WMP_work_new ( Value para)

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

引数:
para[in] configuration parameters
戻り値:
pointer to the newly allocated work area.

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

参照元 j_final_fusion(), と 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.

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

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

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

void WMP_free ( MFCCWork w)

Free all work area for MFCC computation.

引数:
w[i/o] MFCC calculation work area

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

参照元 j_mfcccalc_free().