Julius 4.2
データ構造 | マクロ定義 | 関数
libsent/include/sent/htk_param.h

HTKの特徴パラメータを保持する構造体に関連する定義 [詳細]

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

ソースコードを見る。

データ構造

struct  HTK_Param_Header
 Parameter types and extraction conditions. [詳細]
struct  HTK_Param
 Input speech parameter. [詳細]

マクロ定義

#define HTK_PARAM_INCREMENT_STEP_FRAME   200
 Increment step of HTK Parameter holder in frames.

関数

boolean rdparam (char *, HTK_Param *)
 Top function to read a HTK parameter file.
HTK_Paramnew_param ()
 Allocate a new parameter.
void free_param (HTK_Param *)
 Free the HTK parameter structure.
short param_qualstr2code (char *)
 Convert a qualifier string to a binary type code.
short param_str2code (char *)
 Convert a type string that contains basename and qualifiers to a binary type code.
char * param_qualcode2str (char *, short, boolean)
 Convert the qualifier part of a binary type code to string.
char * param_code2str (char *, short, boolean)
 Convert a binary type code to string.
int guess_basenum (HTK_Param *p, short qualtype)
 Guess the length of the base coefficient according to the total vector length and parameter type.
boolean param_strip_zero (HTK_Param *param)
 Strip zero frames from MFCC data.
void param_init_content (HTK_Param *p)
 Initialize the content of the parameter data.
boolean param_alloc (HTK_Param *p, unsigned int samplenum, short veclen)
 Allocate vector area for required length and frames.
void param_free_content (HTK_Param *p)
 Free and clear the content of the parameter data.
void put_param_head (FILE *fp, HTK_Param_Header *h)
 Output parameter header.
void put_vec (FILE *fp, VECT **p, int num, short veclen)
 Output array of vectors.
void put_param (FILE *fp, HTK_Param *pinfo)
 Output the whole parameter information, including header and all vectors.
void put_param_info (FILE *fp, HTK_Param *pinfo)
 Output the length of an input parameter by number of frames and seconds.

説明

HTKの特徴パラメータを保持する構造体に関連する定義

このファイルには,音声特徴量のベクトル系列を保持する構造体が 定義されています.入力音声から計算されたMFCC等の音声特徴量は, ここで定義される構造体 HTK_Param に保存されます.HTK_Paramには また,特徴量抽出時のフレームシフト幅やウィンドウ長などの情報が 保持されます.

音声特徴量は外部で HTK などによって抽出されたHTK形式の特徴量ファイルを 読み込むことができます.また,MFCC 形式であれば Julius 内で 直接音声波形から抽出することができます.実際にJuliusが内部で抽出する することができる特徴量は {25|26} 次元の MFCC_{0|E}_D[_Z][_N] のみです.

使用する音響モデル(HMM)が学習時に用いた特徴量と認識対象とする入力の 特徴量の形式は一致させる必要があります.認識実行時には,音響モデルと入力 ファイルの特徴量形式がチェックされ,適合しない場合はエラーとなります. ただし,入力音声のサンプリング周波数やフレームシフト幅,ウィンドウ長の 情報はHTK形式の音響モデルには保持されていないため,チェックできません. 注意して下さい.

参照:
htk_defs.h
作者:
Akinobu LEE
日付:
Fri Feb 11 02:52:52 2005
Revision:
1.4

htk_param.h で定義されています。


マクロ定義

#define HTK_PARAM_INCREMENT_STEP_FRAME   200

Increment step of HTK Parameter holder in frames.

htk_param.h90 行で定義されています。

参照元 param_alloc().


関数

boolean rdparam ( char *  filename,
HTK_Param pinfo 
)

Top function to read a HTK parameter file.

引数:
filename[in] HTK parameter file name
pinfo[in] parameter data (already allocated by new_param())
戻り値:
TRUE on success, FALSE on failure.

rdparam.c198 行で定義されています。

参照元 j_open_stream().

HTK_Param* new_param ( )

Allocate a new parameter.

戻り値:
pointer to the newly allocated area.

param_malloc.c121 行で定義されています。

参照元 j_final_fusion(), と mfcc_copy_to_rest_and_shrink().

void free_param ( HTK_Param pinfo)

Free the HTK parameter structure.

引数:
pinfo[in] parameter data to be destroyed.

param_malloc.c138 行で定義されています。

参照元 j_mfcccalc_free(), と j_recognize_stream_core().

short param_qualstr2code ( char *  s)

Convert a qualifier string to a binary type code.

引数:
s[in] a string that contains qualifier strings like "_E_D_Z"
戻り値:
the converted internal binary type code, F_ERR_INVALID if failed.

paramtypes.c70 行で定義されています。

参照元 param_str2code().

short param_str2code ( char *  s)

Convert a type string that contains basename and qualifiers to a binary type code.

引数:
s[in] a string that contains base and qualifier string like "MFCC_E_D_Z"
戻り値:
the converted internal binary type code, F_ERR_INVALID if failed.

paramtypes.c106 行で定義されています。

参照元 read_global_opt().

char* param_qualcode2str ( char *  buf,
short  type,
boolean  descflag 
)

Convert the qualifier part of a binary type code to string.

引数:
buf[out] buffer to store the resulting string (must have enough length)
type[in] binary type code to convert.
descflag[in] set to TRUE if you want result in description string instead of qualifier string.
戻り値:
buf on success, NULL on failure.

paramtypes.c149 行で定義されています。

参照元 param_code2str(), と select_param_vmark().

char* param_code2str ( char *  buf,
short  type,
boolean  descflag 
)

Convert a binary type code to string.

引数:
buf[out] buffer to store the resulting string (must have enough length)
type[in] binary type code to convert.
descflag[in] set to TRUE if you want result in description string instead of base and qualifier string.
戻り値:
buf on success, NULL on failure.

paramtypes.c178 行で定義されています。

参照元 param_check_and_adjust(), print_hmmdef_info(), put_param_head(), と select_param_kind().

int guess_basenum ( HTK_Param p,
short  qualtype 
)

Guess the length of the base coefficient according to the total vector length and parameter type.

引数:
p[in] parameter data
qualtype[in] parameter type
戻り値:
the guessed size of the base coefficient.

paramselect.c133 行で定義されています。

参照元 guess_abs_e_location(), と select_param_vmark().

boolean param_strip_zero ( HTK_Param param)

Strip zero frames from MFCC data.

引数:
param[in] parameter data
戻り値:
TRUE on success, FALSE on failure.

strip_mfcc.c99 行で定義されています。

参照元 j_open_stream().

void param_init_content ( HTK_Param p)

Initialize the content of the parameter data.

引数:
p[out] parameter data

param_malloc.c35 行で定義されています。

参照元 j_open_stream(), j_recognize_stream_core(), new_param(), param_free_content(), と wav2mfcc().

boolean param_alloc ( HTK_Param p,
unsigned int  samplenum,
short  veclen 
)

Allocate vector area for required length and frames.

Allocate memory if not yet, or expand it if already allocated but not sufficient. If sufficient amount is already allocated, do nothing. The allocation are updated by HTK_PARAM_INCREMENT_STEP_FRAME step to avoid numerous re-allocation

引数:
p[i/o] parameter data
samplenum[in] required number of frames
veclen[in] required length of vector
戻り値:
TRUE on success, FALSE on failure.

param_malloc.c54 行で定義されています。

参照元 mfcc_copy_to_rest_and_shrink(), read_param(), RealTimeParam(), RealTimePipeLine(), RealTimePipeLinePrepare(), と wav2mfcc().

void param_free_content ( HTK_Param p)

Free and clear the content of the parameter data.

引数:
p[out] parameter data

param_malloc.c106 行で定義されています。

参照元 free_param().

void put_param_head ( FILE *  fp,
HTK_Param_Header h 
)

Output parameter header.

引数:
fp[in] file descriptor
h[in] pointer to a parameter header information

put_htkdata_info.c274 行で定義されています。

参照元 put_param().

void put_vec ( FILE *  fp,
VECT **  p,
int  num,
short  veclen 
)

Output array of vectors.

引数:
fp[in] file descriptor
p[in] pointer to vector array represented as [0..num-1][0...veclen-1]
num[in] number of vectors in p
veclen[in] length of each vector

put_htkdata_info.c294 行で定義されています。

参照元 put_param().

void put_param ( FILE *  fp,
HTK_Param pinfo 
)

Output the whole parameter information, including header and all vectors.

引数:
fp[in] file descriptor
pinfo[in] pointer to parameter structure.

put_htkdata_info.c316 行で定義されています。

void put_param_info ( FILE *  fp,
HTK_Param pinfo 
)

Output the length of an input parameter by number of frames and seconds.

引数:
fp[in] file descriptor
pinfo[in] pointer to parameter structure.

put_htkdata_info.c330 行で定義されています。