Julius 4.2
関数
libsent/src/wav2mfcc/wav2mfcc-pipe.c

音声波形から MFCC 特徴量へ変換する (フレーム単位) [詳細]

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

ソースコードを見る。

関数

DeltaBufWMP_deltabuf_new (int veclen, int windowlen)
 Allocate a new delta cycle buffer.
void WMP_deltabuf_free (DeltaBuf *db)
 Destroy the delta cycle buffer.
void WMP_deltabuf_prepare (DeltaBuf *db)
 Reset and clear the delta cycle buffer.
static void WMP_deltabuf_calc (DeltaBuf *db, int cur)
 Calculate delta coefficients of the specified point in the cycle buffer.
boolean WMP_deltabuf_proceed (DeltaBuf *db, float *new_mfcc)
 Store the given MFCC vector into the delta cycle buffer, and compute the latest delta coefficients.
boolean WMP_deltabuf_flush (DeltaBuf *db)
 Flush the delta cycle buffer the delta coefficients left in the cycle buffer.
CMNWorkCMN_realtime_new (Value *para, float weight)
 Initialize MAP-CMN at startup.
void CMN_realtime_free (CMNWork *c)
 Free work area for real-time CMN.
void CMN_realtime_prepare (CMNWork *c)
 Prepare for MAP-CMN at start of each input.
void CMN_realtime (CMNWork *c, float *mfcc)
 Perform MAP-CMN for incoming MFCC vectors.
void CMN_realtime_update (CMNWork *c, HTK_Param *param)
 Update initial cepstral mean from previous utterances for next input.
static boolean myread (void *buf, size_t unitbyte, int unitnum, FILE *fp)
 Read binary with byte swap (assume file is Big Endian)
static boolean mywrite (void *buf, size_t unitbyte, size_t unitnum, int fd)
 Write binary with byte swap (assume data is Big Endian)
boolean CMN_load_from_file (CMNWork *c, char *filename)
 Load CMN parameter from file.
boolean CMN_save_to_file (CMNWork *c, char *filename)
 Save the current CMN vector to a file.
void energy_max_init (ENERGYWork *energy)
 Initialize work area for energy normalization on live input.
void energy_max_prepare (ENERGYWork *energy, Value *para)
 Prepare values for energy normalization on live input.
LOGPROB energy_max_normalize (ENERGYWork *energy, LOGPROB f, Value *para)
 Peform energy normalization using maximum of last input.

説明

音声波形から MFCC 特徴量へ変換する (フレーム単位)

ここでは wav2mfcc.c の関数をフレーム同期に処理するために変換した 関数が納められています.認識処理を音声入力と平行して行う場合,こちらの 関数が用いられます.

作者:
Akinobu LEE
日付:
Thu Feb 17 18:12:30 2005
Revision:
1.6

wav2mfcc-pipe.c で定義されています。


関数

DeltaBuf* WMP_deltabuf_new ( int  veclen,
int  windowlen 
)

Allocate a new delta cycle buffer.

引数:
veclen[in] length of a vector
windowlen[in] window width for computing delta
戻り値:
pointer to newly allocated delta cycle buffer structure.

wav2mfcc-pipe.c60 行で定義されています。

参照元 RealTimeInit().

void WMP_deltabuf_free ( DeltaBuf db)

Destroy the delta cycle buffer.

引数:
db[i/o] delta cycle buffer

wav2mfcc-pipe.c87 行で定義されています。

参照元 j_mfcccalc_free().

void WMP_deltabuf_prepare ( DeltaBuf db)

Reset and clear the delta cycle buffer.

引数:
db[i/o] delta cycle buffer

wav2mfcc-pipe.c105 行で定義されています。

参照元 reset_mfcc().

static void WMP_deltabuf_calc ( DeltaBuf db,
int  cur 
) [static]

Calculate delta coefficients of the specified point in the cycle buffer.

引数:
db[i/o] delta cycle buffer
cur[in] target point to calculate the delta coefficients

wav2mfcc-pipe.c121 行で定義されています。

参照元 WMP_deltabuf_flush(), と WMP_deltabuf_proceed().

boolean WMP_deltabuf_proceed ( DeltaBuf db,
float *  new_mfcc 
)

Store the given MFCC vector into the delta cycle buffer, and compute the latest delta coefficients.

引数:
db[i/o] delta cycle buffer
new_mfcc[in] MFCC vector
戻り値:
TRUE if next delta coeff. computed, in that case it is saved in db->delta[], or FALSE if delta is not yet computed by short of data.

wav2mfcc-pipe.c164 行で定義されています。

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

boolean WMP_deltabuf_flush ( DeltaBuf db)

Flush the delta cycle buffer the delta coefficients left in the cycle buffer.

引数:
db[i/o] delta cycle buffer
戻り値:
TRUE if next delta coeff. computed, in that case it is saved in db->delta[], or FALSE if all delta computation has been flushed and no data is available.

wav2mfcc-pipe.c206 行で定義されています。

参照元 RealTimeParam().

CMNWork* CMN_realtime_new ( Value para,
float  weight 
)

Initialize MAP-CMN at startup.

引数:
para[in] MFCC computation configuration parameter
weight[in] initial cepstral mean weight

wav2mfcc-pipe.c247 行で定義されています。

参照元 RealTimeInit().

void CMN_realtime_free ( CMNWork c)

Free work area for real-time CMN.

引数:
c[i/o] CMN calculation work area

wav2mfcc-pipe.c285 行で定義されています。

参照元 j_mfcccalc_free().

void CMN_realtime_prepare ( CMNWork c)

Prepare for MAP-CMN at start of each input.

引数:
c[i/o] CMN calculation work area

wav2mfcc-pipe.c309 行で定義されています。

参照元 init_param(), と RealTimeResume().

void CMN_realtime ( CMNWork c,
float *  mfcc 
)

Perform MAP-CMN for incoming MFCC vectors.

引数:
c[i/o] CMN calculation work area
mfcc[in] MFCC vector

wav2mfcc-pipe.c328 行で定義されています。

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

void CMN_realtime_update ( CMNWork c,
HTK_Param param 
)

Update initial cepstral mean from previous utterances for next input.

引数:
c[i/o] CMN calculation work area

wav2mfcc-pipe.c389 行で定義されています。

参照元 RealTimeCMNUpdate().

static boolean myread ( void *  buf,
size_t  unitbyte,
int  unitnum,
FILE *  fp 
) [static]

Read binary with byte swap (assume file is Big Endian)

引数:
buf[out] data buffer
unitbyte[in] size of unit in bytes
unitnum[in] number of units to be read
fp[in] file pointer
戻り値:
TRUE if required number of units are fully read, FALSE if failed.

wav2mfcc-pipe.c476 行で定義されています。

参照元 CMN_load_from_file().

static boolean mywrite ( void *  buf,
size_t  unitbyte,
size_t  unitnum,
int  fd 
) [static]

Write binary with byte swap (assume data is Big Endian)

引数:
buf[in] data buffer
unitbyte[in] size of unit in bytes
unitnum[in] number of units to write
fd[in] file descriptor
戻り値:
TRUE if required number of units are fully written, FALSE if failed.

wav2mfcc-pipe.c498 行で定義されています。

参照元 CMN_save_to_file().

boolean CMN_load_from_file ( CMNWork c,
char *  filename 
)

Load CMN parameter from file.

If the number of MFCC dimension in the file does not match the specified one, an error will occur.

引数:
c[i/o] CMN calculation work area
filename[in] file name
戻り値:
TRUE on success, FALSE on failure.

wav2mfcc-pipe.c522 行で定義されています。

参照元 RealTimeInit().

boolean CMN_save_to_file ( CMNWork c,
char *  filename 
)

Save the current CMN vector to a file.

引数:
c[i/o] CMN calculation work area
filename[in] filename to save the data.
戻り値:
TRUE on success, FALSE on failure.

wav2mfcc-pipe.c579 行で定義されています。

参照元 RealTimeCMNUpdate().

void energy_max_init ( ENERGYWork energy)

Initialize work area for energy normalization on live input.

This should be called once on startup.

引数:
energy[in] energy normalization work area

wav2mfcc-pipe.c633 行で定義されています。

参照元 RealTimeInit().

void energy_max_prepare ( ENERGYWork energy,
Value para 
)

Prepare values for energy normalization on live input.

This should be called before each input segment.

引数:
energy[in] energy normalization work area
para[in] MFCC computation configuration parameter

wav2mfcc-pipe.c646 行で定義されています。

参照元 reset_mfcc().

LOGPROB energy_max_normalize ( ENERGYWork energy,
LOGPROB  f,
Value para 
)

Peform energy normalization using maximum of last input.

引数:
energy[in] energy normalization work area
f[in] raw energy
para[in] MFCC computation configuration parameter
戻り値:
value of the normalized log energy.

wav2mfcc-pipe.c663 行で定義されています。

参照元 RealTimeMFCC().