#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_Param * | new_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. |
このファイルには,音声特徴量のベクトル系列を保持する構造体が 定義されています.入力音声から計算されたMFCC等の音声特徴量は, ここで定義される構造体 HTK_Param に保存されます.HTK_Paramには また,特徴量抽出時のフレームシフト幅やウィンドウ長などの情報が 保持されます.
音声特徴量は外部で HTK などによって抽出されたHTK形式の特徴量ファイルを 読み込むことができます.また,MFCC 形式であれば Julius 内で 直接音声波形から抽出することができます.実際にJuliusが内部で抽出する することができる特徴量は {25|26} 次元の MFCC_{0|E}_D[_Z][_N] のみです.
使用する音響モデル(HMM)が学習時に用いた特徴量と認識対象とする入力の 特徴量の形式は一致させる必要があります.認識実行時には,音響モデルと入力 ファイルの特徴量形式がチェックされ,適合しない場合はエラーとなります. ただし,入力音声のサンプリング周波数やフレームシフト幅,ウィンドウ長の 情報はHTK形式の音響モデルには保持されていないため,チェックできません. 注意して下さい.
htk_param.h で定義されています。
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()) |
HTK_Param* new_param | ( | ) |
void free_param | ( | HTK_Param * | pinfo | ) |
Free the HTK parameter structure.
pinfo | [in] parameter data to be destroyed. |
param_malloc.c の 138 行で定義されています。
参照元 j_mfcccalc_free().
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" |
paramtypes.c の 70 行で定義されています。
参照元 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" |
paramtypes.c の 106 行で定義されています。
参照元 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. |
paramtypes.c の 149 行で定義されています。
参照元 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. |
paramtypes.c の 178 行で定義されています。
参照元 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 |
paramselect.c の 133 行で定義されています。
boolean param_strip_zero | ( | HTK_Param * | param | ) |
Strip zero frames from MFCC data.
param | [in] parameter data |
strip_mfcc.c の 99 行で定義されています。
void param_init_content | ( | HTK_Param * | p | ) |
Initialize the content of the parameter data.
p | [out] parameter data |
param_malloc.c の 35 行で定義されています。
参照元 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 |
param_malloc.c の 54 行で定義されています。
参照元 init_param(), mfcc_copy_to_rest_and_shrink(), read_param(), RealTimeParam(), RealTimePipeLine(), と wav2mfcc().
void param_free_content | ( | HTK_Param * | p | ) |
Free and clear the content of the parameter data
p | [out] parameter data |
param_malloc.c の 106 行で定義されています。
参照元 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.c の 237 行で定義されています。
参照元 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.c の 255 行で定義されています。
参照元 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.c の 277 行で定義されています。
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.c の 291 行で定義されています。