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

HTK形式のHMMを扱うデータ構造の定義 [詳細]

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

ソースコードを見る。

データ構造

struct  HTK_HMM_StreamInfo
 Stream information (although current Julius supports only single stream) [詳細]
struct  HTK_HMM_Options
 HMM Option [詳細]
struct  HTK_HMM_Trans
 HMM transition table [詳細]
struct  HTK_HMM_Var
 HMM variance data [詳細]
struct  HTK_HMM_Dens
 HMM Gaussian density (or mixture) data [詳細]
struct  HTK_HMM_StreamWeight
 HMM stream weight definition [詳細]
struct  HTK_HMM_PDF
 HMM mixture PDF for a stream [詳細]
struct  HTK_HMM_State
 HMM state data [詳細]
struct  HTK_HMM_Data
 Top HMM model, corresponds to "~h" macro in hmmdefs. [詳細]
struct  GCODEBOOK
 Gaussian mixture codebook in tied-mixture model. [詳細]
struct  GS_SET
 Set of HMM states for Gaussian Mixture Selection. [詳細]
struct  CD_State_Set
struct  CD_Set
 Context-dependent HMM set (called "pseudo") for a logical context. [詳細]
struct  HMM_CDSET_INFO
 Top structure to hold all the HMM sets. [詳細]
struct  HMM_Logical
 Logical HMM to map logical names to physical/pseudo HMM. [詳細]
struct  BASEPHONE
 Basephone information extracted from hmminfo. [詳細]
struct  HMM_basephone
 List of all basephone in hmminfo. [詳細]
struct  HTK_HMM_INFO
 Top HMM structure that holds all the HTK HMM definition. [詳細]

マクロ定義

#define currentis(A)   (!strcasecmp(A, rdhmmdef_token))
 Macro to check whether the next token is "A".
#define NoTokErr(S)   if (!rdhmmdef_token) rderr(S)
 Macro to jump to error if no token left.
#define HMMDEF_DELM   " \t\n<>"
 Delimiter string for parsing HMM definition file.
#define MAX_STATE_NUM   2147483647
#define HMM_RC_DLIM   "+"
 Delimiter strings/characters to generate logical triphone names.
#define HMM_LC_DLIM   "-"
 Left context delimiter in string.
#define HMM_RC_DLIM_C   '+'
 Right context delimiter in character.
#define HMM_LC_DLIM_C   '-'
 Left context delimiter in character.
#define SPMODEL_NAME_DEFAULT   "sp"
 Default logical name of short pause model.
#define MAX_HMMNAME_LEN   256
 Length limit of HMM name (including ones generated in Julius)

列挙型

enum  iwcd_type { IWCD_UNDEF, IWCD_MAX, IWCD_AVG, IWCD_NBEST }
 Specify method of calculating approximated acoustic score at inter-word context pseudo phones on word edge. [詳細]

関数

void htk_hmm_set_pause_model (HTK_HMM_INFO *hmminfo, char *spmodel_name)
 Set up pause model.
void rderr (char *str)
 Output error message, with current reading status, and terminate.
char * read_token (FILE *fp)
 Read next token and ste it to rdhmmdef_token.
boolean rdhmmdef (FILE *, HTK_HMM_INFO *)
 Main top routine to read in HTK HMM definition file.
void htk_hmm_inverse_variances (HTK_HMM_INFO *hmm)
 Invert all the variance values.
boolean set_global_opt (FILE *fp, HTK_HMM_INFO *hmm)
 Set global options starting at the current token to HMM definition data.
char * get_cov_str (short covtype)
 Get covariance option name string from its type code.
char * get_dur_str (short durtype)
 Get duration option name string from its type code.
void trans_add (HTK_HMM_INFO *hmm, HTK_HMM_Trans *newParam)
 Add a new data to the global structure.
HTK_HMM_Transget_trans_data (FILE *, HTK_HMM_INFO *)
 Return a pointer to the data located at the current point.
void def_trans_macro (char *, FILE *, HTK_HMM_INFO *)
 Read a new data and store it as a macro.
HTK_HMM_Stateget_state_data (FILE *, HTK_HMM_INFO *)
 Return a pointer to the data located at the current point.
void def_state_macro (char *, FILE *, HTK_HMM_INFO *)
 Read a new data and store it as a macro.
HTK_HMM_Statestate_lookup (HTK_HMM_INFO *hmm, char *keyname)
 Look up a data macro by the name.
void state_add (HTK_HMM_INFO *hmm, HTK_HMM_State *newParam)
 Add a new data to the global structure.
void mpdf_add (HTK_HMM_INFO *hmm, HTK_HMM_PDF *newParam)
 Add a new data to the global structure.
HTK_HMM_PDFmpdf_lookup (HTK_HMM_INFO *hmm, char *keyname)
 Look up a data macro by the name.
HTK_HMM_PDFget_mpdf_data (FILE *fp, HTK_HMM_INFO *hmm, int mix_num, short stream_id)
 Return a pointer to the data located at the current point.
void def_mpdf_macro (char *name, FILE *fp, HTK_HMM_INFO *hmm)
 Read a new data and store it as a macro.
HTK_HMM_Densget_dens_data (FILE *, HTK_HMM_INFO *)
 Return a pointer to the data located at the current point.
void def_dens_macro (char *, FILE *, HTK_HMM_INFO *)
 Read a new data and store it as a macro.
HTK_HMM_Densdens_lookup (HTK_HMM_INFO *hmm, char *keyname)
 Look up a data macro by the name.
void dens_add (HTK_HMM_INFO *hmm, HTK_HMM_Dens *newParam)
 Add a new data to the global structure.
HTK_HMM_Varget_var_data (FILE *, HTK_HMM_INFO *)
 Return a pointer to the data located at the current point.
void def_var_macro (char *, FILE *, HTK_HMM_INFO *)
 Read a new data and store it as a macro.
void var_add (HTK_HMM_INFO *hmm, HTK_HMM_Var *newParam)
 Add a new data to the global structure.
HTK_HMM_StreamWeightget_streamweight_data (FILE *fp, HTK_HMM_INFO *hmm)
 Return a pointer to the data located at the current point.
void def_streamweight_macro (char *, FILE *, HTK_HMM_INFO *)
 Read a stream weight definition and store it as a macro.
void sw_add (HTK_HMM_INFO *hmm, HTK_HMM_StreamWeight *newParam)
 Add a new data to the global structure.
void def_HMM (char *, FILE *, HTK_HMM_INFO *)
 Read a new data and store it as a macro.
HTK_HMM_Datahtk_hmmdata_new (HTK_HMM_INFO *)
 Allocate a new data and return it.
void htk_hmmdata_add (HTK_HMM_INFO *hmm, HTK_HMM_Data *newParam)
 Add a new data to the global structure.
void tmix_read (FILE *fp, HTK_HMM_PDF *mpdf, HTK_HMM_INFO *hmm)
 Read a codebook name and weights, build the codebook structure on demand, and assigns them to the current mixture PDF.
void codebook_add (HTK_HMM_INFO *hmm, GCODEBOOK *newParam)
 Add a new data to the global structure.
void def_regtree_macro (char *name, FILE *fp, HTK_HMM_INFO *hmm)
 Skip a regression tree data or its macro reference.
boolean rdhmmlist (FILE *fp, HTK_HMM_INFO *hmminfo)
 Read a HMMList file and build initial logical triphone list.
boolean save_hmmlist_bin (FILE *fp, HTK_HMM_INFO *hmminfo)
 Write hmmlist (logical-to-physical mapping table) and cdset (pseudo phone set) to file.
boolean load_hmmlist_bin (FILE *fp, HTK_HMM_INFO *hmminfo)
 Load HMMList and CDSet data from binary file.
void put_htk_trans (FILE *fp, HTK_HMM_Trans *t)
 Output transition matrix.
void put_htk_var (FILE *fp, HTK_HMM_Var *v)
 Output variance vector (diagonal).
void put_htk_dens (FILE *fp, HTK_HMM_Dens *d)
 Output a density information, mean and variance.
void put_htk_mpdf (FILE *fp, HTK_HMM_PDF *m)
 Output a mixture component.
void put_htk_state (FILE *fp, HTK_HMM_State *s)
 Output a state.
void put_htk_hmm (FILE *fp, HTK_HMM_Data *h)
 Output HMM model, number of states and information for each state.
void put_logical_hmm (FILE *fp, HMM_Logical *l)
 Output logical HMM data and its mapping status.
void print_hmmdef_info (FILE *fp, HTK_HMM_INFO *)
 Output total statistic informations of the HMM definition data.
HTK_HMM_INFOhmminfo_new ()
 Allocate memory for a new HMM definition data.
boolean hmminfo_free (HTK_HMM_INFO *)
 Free memory of an HMM.
boolean init_hmminfo (HTK_HMM_INFO *hmminfo, char *filename, char *mapfile, Value *para)
 Load HTK HMM definition file and HMMList file, and setup phone HMM information.
HTK_HMM_Datahtk_hmmdata_lookup_physical (HTK_HMM_INFO *, char *)
 Look up physical (defined in HTK HMM definition file) HMM by its name.
HMM_Logicalhtk_hmmdata_lookup_logical (HTK_HMM_INFO *, char *)
 Look up logical HMM by its name.
void hmm_add_physical_to_logical (HTK_HMM_INFO *)
 Add all physical HMM to logical HMM.
void hmm_add_pseudo_phones (HTK_HMM_INFO *hmminfo)
 Update logical HMM list by adding all the possible pseudo monophone and biphone to the list.
void make_hmm_basephone_list (HTK_HMM_INFO *hmminfo)
 Build a list of base phones by gathering center phones of the defined HMM.
boolean htk_hmm_has_several_arc_on_edge (HTK_HMM_INFO *hmminfo)
 Return TRUE if it has more than one arc from initial state, or to the final state.
boolean check_hmm_limit (HTK_HMM_Data *dt)
 Check if the transition matrix conforms the ristrictions of Julius.
boolean check_all_hmm_limit (HTK_HMM_INFO *hmm)
 Check all the HMM definitions in a HTK HMM definition data.
boolean check_hmm_options (HTK_HMM_INFO *hmm)
 Check if the required parameter type in this HMM can be handled by Julius.
boolean is_skippable_model (HTK_HMM_Data *d)
 モデルが,出力状態を経由せずに入力状態から出力状態へ直接遷移するような 遷移を持つかどうかをチェックする.
boolean guess_if_cd_hmm (HTK_HMM_INFO *hmm)
 Guess whether the given HMM definition contains context-dependent modeling, just by the naming rule.
HMM_Logicalget_right_context_HMM (HMM_Logical *base, char *rc_name, HTK_HMM_INFO *hmminfo)
 Search for right context HMM in logical HMM.
HMM_Logicalget_left_context_HMM (HMM_Logical *base, char *lc_name, HTK_HMM_INFO *hmminfo)
 Search for left context HMM in logical HMM.
void add_right_context (char name[], char *rc)
 Generate context-dependent phone name from base phone name and its right context phone name.
void add_left_context (char name[], char *lc)
 Generate context-dependent phone name from base phone name and its left context phone name.
char * center_name (char *hmmname, char *buf)
 Extract the center phone name and copy to the specified buffer.
char * leftcenter_name (char *hmmname, char *buf)
 Return "left - center" phone name, modifying buf.
char * rightcenter_name (char *hmmname, char *buf)
 Return "center + right" phone name, modifying buf.
boolean regist_cdset (APATNODE **root, HTK_HMM_Data *d, char *cdname, BMALLOC_BASE **mroot)
 Register a physical HMM as a member of a pseudo phone set.
boolean make_cdset (HTK_HMM_INFO *hmminfo)
 Construct the whole pseudo HMM information, and also add them to the logical Triphone tree.
void put_all_cdinfo (HTK_HMM_INFO *hmminfo)
 Output all pseudo phone set information to stdout.
void free_cdset (APATNODE **root, BMALLOC_BASE **mroot)
 Remove all the registered category-indexed pseudo state sets.
CD_Setcdset_lookup (HTK_HMM_INFO *hmminfo, char *cdstr)
 Look up for a pseudo phone with the name, and return the content.
CD_Setlcdset_lookup_by_hmmname (HTK_HMM_INFO *hmminfo, char *hmmname)
 Look up for a pseudo phone by the "left - center" name of the given phone name.
CD_Setrcdset_lookup_by_hmmname (HTK_HMM_INFO *hmminfo, char *hmmname)
 Look up for a pseudo phone by the "center + right" name of the given phone name.
int hmm_logical_state_num (HMM_Logical *lg)
 Generic function to get the number of states in a logical HMM.
HTK_HMM_Transhmm_logical_trans (HMM_Logical *lg)
 Generic function to get transition matrix of a logical HMM.
boolean check_param_coherence (HTK_HMM_INFO *hmm, HTK_Param *pinfo)
 Check if an input parameter type exactly matches that of HMM.
boolean check_param_basetype (HTK_HMM_INFO *hmm, HTK_Param *pinfo)
 Check if the base type of input parameter matches that of HMM.
int param_check_and_adjust (HTK_HMM_INFO *hmm, HTK_Param *pinfo, boolean vflag)
 Top function to adjust parameter.
boolean write_binhmm (FILE *fp, HTK_HMM_INFO *hmm, Value *para)
 Top function to write HMM definition data to a binary file.
boolean read_binhmm (FILE *fp, HTK_HMM_INFO *hmm, boolean gzfile_p, Value *para)
 Top function to read a binary HMM file from fp.

説明

HTK形式のHMMを扱うデータ構造の定義

このファイルには, HTK形式のHMM定義ファイルを読み込むための構造体が 定義されています.

作者:
Akinobu LEE
日付:
Thu Feb 10 19:36:47 2005
Revision:
1.9

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


関数

void htk_hmm_set_pause_model ( HTK_HMM_INFO hmminfo,
char *  spmodel_name 
)

Set up pause model.

引数:
hmminfo[i/o] HMM definition data
spmodel_name[in] name string of short pause model

init_phmm.c243 行で定義されています。

参照元 initialize_HMM().

void rderr ( char *  str)
char* read_token ( FILE *  fp)

Read next token and ste it to rdhmmdef_token.

引数:
fp[in] file pointer
戻り値:
the pointer to the read token, or NULL on end of file or error.

rdhmmdef.c80 行で定義されています。

参照元 dens_read(), get_dens_data(), get_mpdf_data(), get_state_data(), get_streamweight_data(), get_trans_data(), get_var_data(), htk_hmmdata_read(), mpdf_read(), rdhmmdef(), read_global_opt(), regtree_read(), state_read(), sw_read(), tmix_read(), trans_read(), と var_read().

boolean rdhmmdef ( FILE *  fp,
HTK_HMM_INFO hmm 
)

Main top routine to read in HTK HMM definition file.

A HTK HMM definition file will be read from fp. After reading, the parameter type is checked and calculate some statistics.

引数:
fp[in] file pointer
hmm[out] pointer to a HMM definition structure to store data.
戻り値:
TRUE on success, FALSE on failure.

rdhmmdef.c177 行で定義されています。

参照元 init_hmminfo().

void htk_hmm_inverse_variances ( HTK_HMM_INFO hmm)

Invert all the variance values.

引数:
hmm[i/o] HMM definition data to modify.

rdhmmdef.c123 行で定義されています。

参照元 gmm_init(), outprob_init(), rdhmmdef(), と read_binhmm().

boolean set_global_opt ( FILE *  fp,
HTK_HMM_INFO hmm 
)

Set global options starting at the current token to HMM definition data.

引数:
fp[in] file pointer
hmm[out] HMM definition data to store the global options
戻り値:
TRUE on success, FALSE on failure or error.

rdhmmdef_options.c146 行で定義されています。

参照元 rdhmmdef().

char* get_cov_str ( short  covtype)

Get covariance option name string from its type code.

引数:
covtype[in] type code to search
戻り値:
the name string if found, or NULL if not found.

rdhmmdef_options.c197 行で定義されています。

参照元 print_hmmdef_info().

char* get_dur_str ( short  durtype)

Get duration option name string from its type code.

引数:
durtype[in] type code to search
戻り値:
the name string if found, or NULL if not found.

rdhmmdef_options.c210 行で定義されています。

参照元 print_hmmdef_info().

void trans_add ( HTK_HMM_INFO hmm,
HTK_HMM_Trans new 
)

Add a new data to the global structure.

引数:
hmm[i/o] HMM definition data to store it
new[in] new data to be added

rdhmmdef_trans.c61 行で定義されています。

参照元 def_trans_macro(), get_trans_data(), と rd_trans().

HTK_HMM_Trans* get_trans_data ( FILE *  fp,
HTK_HMM_INFO hmm 
)

Return a pointer to the data located at the current point.

If the current point is a macro reference, the pointer to the already defined data will be searched and returned. Otherwise, the definition of the data will be read from the current point and pointer to the newly allocated data will be returned.

引数:
fp[in] file pointer
hmm[i/o] HMM definition data
戻り値:
pointer to the data located at the current point.

rdhmmdef_trans.c173 行で定義されています。

参照元 htk_hmmdata_read().

void def_trans_macro ( char *  name,
FILE *  fp,
HTK_HMM_INFO hmm 
)

Read a new data and store it as a macro.

引数:
name[in] macro name
fp[in] file pointer
hmm[i/o] HMM definition data

rdhmmdef_trans.c208 行で定義されています。

参照元 rdhmmdef().

HTK_HMM_State* get_state_data ( FILE *  fp,
HTK_HMM_INFO hmm 
)

Return a pointer to the data located at the current point.

If the current point is a macro reference, the pointer to the already defined data will be searched and returned. Otherwise, the definition of the data will be read from the current point and pointer to the newly allocated data will be returned.

引数:
fp[in] file pointer
hmm[i/o] HMM definition data
戻り値:
pointer to the data located at the current point.

rdhmmdef_state.c187 行で定義されています。

参照元 htk_hmmdata_read().

void def_state_macro ( char *  name,
FILE *  fp,
HTK_HMM_INFO hmm 
)

Read a new data and store it as a macro.

引数:
name[in] macro name
fp[in] file pointer
hmm[i/o] HMM definition data

rdhmmdef_state.c224 行で定義されています。

参照元 rdhmmdef().

HTK_HMM_State* state_lookup ( HTK_HMM_INFO hmm,
char *  keyname 
)

Look up a data macro by the name.

引数:
hmm[in] HMM definition data
keyname[in] macro name to find
戻り値:
pointer to the found data, or NULL if not found.

rdhmmdef_state.c96 行で定義されています。

参照元 build_state2gs(), と get_state_data().

void state_add ( HTK_HMM_INFO hmm,
HTK_HMM_State new 
)

Add a new data to the global structure.

引数:
hmm[i/o] HMM definition data to store it
new[in] new data to be added

rdhmmdef_state.c62 行で定義されています。

参照元 def_state_macro(), get_state_data(), と rd_state().

void mpdf_add ( HTK_HMM_INFO hmm,
HTK_HMM_PDF new 
)

Add a new data to the global structure.

引数:
hmm[i/o] HMM definition data to store it
new[in] new data to be added

rdhmmdef_mpdf.c60 行で定義されています。

参照元 def_mpdf_macro(), get_mpdf_data(), rd_mpdf(), と rd_state().

HTK_HMM_PDF* mpdf_lookup ( HTK_HMM_INFO hmm,
char *  keyname 
)

Look up a data macro by the name.

引数:
hmm[in] HMM definition data
keyname[in] macro name to find
戻り値:
pointer to the found data, or NULL if not found.

rdhmmdef_mpdf.c93 行で定義されています。

参照元 get_mpdf_data().

HTK_HMM_PDF* get_mpdf_data ( FILE *  fp,
HTK_HMM_INFO hmm,
int  mix_num,
short  stream_id 
)

Return a pointer to the data located at the current point.

If the current point is a macro reference, the pointer to the already defined data will be searched and returned. Otherwise, the definition of the data will be read from the current point and pointer to the newly allocated data will be returned.

引数:
fp[in] file pointer
hmm[i/o] HMM definition data
mix_num[in] num of Gaussians to be read, or -1 if not specified
stream_id[in] stream ID, or -1 if not specified yet
戻り値:
pointer to the data located at the current point.

rdhmmdef_mpdf.c217 行で定義されています。

参照元 state_read().

void def_mpdf_macro ( char *  name,
FILE *  fp,
HTK_HMM_INFO hmm 
)

Read a new data and store it as a macro.

引数:
name[in] macro name
fp[in] file pointer
hmm[i/o] HMM definition data

rdhmmdef_mpdf.c265 行で定義されています。

参照元 rdhmmdef().

HTK_HMM_Dens* get_dens_data ( FILE *  fp,
HTK_HMM_INFO hmm 
)

Return a pointer to the data located at the current point.

If the current point is a macro reference, the pointer to the already defined data will be searched and returned. Otherwise, the definition of the data will be read from the current point and pointer to the newly allocated data will be returned.

引数:
fp[in] file pointer
hmm[i/o] HMM definition data
戻り値:
pointer to the data located at the current point.

rdhmmdef_dens.c200 行で定義されています。

参照元 mpdf_read().

void def_dens_macro ( char *  name,
FILE *  fp,
HTK_HMM_INFO hmm 
)

Read a new data and store it as a macro.

引数:
name[in] macro name
fp[in] file pointer
hmm[i/o] HMM definition data

rdhmmdef_dens.c234 行で定義されています。

参照元 rdhmmdef().

HTK_HMM_Dens* dens_lookup ( HTK_HMM_INFO hmm,
char *  keyname 
)

Look up a data macro by the name.

引数:
hmm[in] HMM definition data
keyname[in] macro name to find
戻り値:
pointer to the found data, or NULL if not found.

rdhmmdef_dens.c113 行で定義されています。

参照元 get_dens_data(), と tmix_create_codebook_index().

void dens_add ( HTK_HMM_INFO hmm,
HTK_HMM_Dens new 
)

Add a new data to the global structure.

引数:
hmm[i/o] HMM definition data to store it
new[in] new data to be added

rdhmmdef_dens.c80 行で定義されています。

参照元 def_dens_macro(), get_dens_data(), と rd_dens().

HTK_HMM_Var* get_var_data ( FILE *  fp,
HTK_HMM_INFO hmm 
)

Return a pointer to the data located at the current point.

If the current point is a macro reference, the pointer to the already defined data will be searched and returned. Otherwise, the definition of the data will be read from the current point and pointer to the newly allocated data will be returned.

引数:
fp[in] file pointer
hmm[i/o] HMM definition data
戻り値:
pointer to the data located at the current point.

rdhmmdef_var.c163 行で定義されています。

参照元 dens_read().

void def_var_macro ( char *  name,
FILE *  fp,
HTK_HMM_INFO hmm 
)

Read a new data and store it as a macro.

引数:
name[in] macro name
fp[in] file pointer
hmm[i/o] HMM definition data

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

参照元 rdhmmdef().

void var_add ( HTK_HMM_INFO hmm,
HTK_HMM_Var new 
)

Add a new data to the global structure.

引数:
hmm[i/o] HMM definition data to store it
new[in] new data to be added

rdhmmdef_var.c59 行で定義されています。

参照元 def_var_macro(), get_var_data(), と rd_var().

HTK_HMM_StreamWeight* get_streamweight_data ( FILE *  fp,
HTK_HMM_INFO hmm 
)

Return a pointer to the data located at the current point.

If the current point is a macro reference, the pointer to the already defined data will be searched and returned. Otherwise, the definition of the data will be read from the current point and pointer to the newly allocated data will be returned.

引数:
fp[in] file pointer
hmm[i/o] HMM definition data
戻り値:
pointer to the data located at the current point.

rdhmmdef_streamweight.c159 行で定義されています。

参照元 state_read().

void def_streamweight_macro ( char *  name,
FILE *  fp,
HTK_HMM_INFO hmm 
)

Read a stream weight definition and store it as a macro.

引数:
name[in] macro name
fp[in] file pointer
hmm[i/o] HMM definition data

rdhmmdef_streamweight.c194 行で定義されています。

参照元 rdhmmdef().

void sw_add ( HTK_HMM_INFO hmm,
HTK_HMM_StreamWeight new 
)

Add a new data to the global structure.

引数:
hmm[i/o] HMM definition data to store it
new[in] new data to be added

rdhmmdef_streamweight.c57 行で定義されています。

参照元 def_streamweight_macro(), get_streamweight_data(), と rd_streamweight().

void def_HMM ( char *  name,
FILE *  fp,
HTK_HMM_INFO hmm 
)

Read a new data and store it as a macro.

引数:
name[in] macro name
fp[in] file pointer
hmm[i/o] HMM definition data

rdhmmdef_data.c160 行で定義されています。

参照元 rdhmmdef().

HTK_HMM_Data* htk_hmmdata_new ( HTK_HMM_INFO hmminfo)

Allocate a new data and return it.

戻り値:
pointer to newly allocated data.

rdhmmdef_data.c36 行で定義されています。

参照元 htk_hmmdata_read().

void htk_hmmdata_add ( HTK_HMM_INFO hmm,
HTK_HMM_Data new 
)

Add a new data to the global structure.

引数:
hmm[i/o] HMM definition data to store it
new[in] new data to be added

rdhmmdef_data.c58 行で定義されています。

参照元 def_HMM(), と rd_data().

void tmix_read ( FILE *  fp,
HTK_HMM_PDF mpdf,
HTK_HMM_INFO hmm 
)

Read a codebook name and weights, build the codebook structure on demand, and assigns them to the current mixture PDF.

The required codebook on the current token will be assigned to this mpdf. If the corresponding codebook structure is not built yet, it will be constructed here on demand by gathering corresponding mixture density definitions. Then this mpdf will store the pointer to the codebook, together with its own mixture weights in the following tokens.

引数:
fp[in] file pointer
mpdf[i/o] current HMM mixture PDF to hold pointer to the codebook and their weights
hmm[i/o] HMM definition data, codebook statistics and tied-mixture marker will be modified.

rdhmmdef_tiedmix.c137 行で定義されています。

参照元 mpdf_read().

void codebook_add ( HTK_HMM_INFO hmm,
GCODEBOOK new 
)

Add a new data to the global structure.

引数:
hmm[i/o] HMM definition data to store it
new[in] new data to be added

rdhmmdef_tiedmix.c59 行で定義されています。

参照元 rd_tmix(), と tmix_read().

void def_regtree_macro ( char *  name,
FILE *  fp,
HTK_HMM_INFO hmm 
)

Skip a regression tree data or its macro reference.

引数:
name[in] macro name
fp[in] file pointer
hmm[in] HMM definition data

rdhmmdef_regtree.c72 行で定義されています。

参照元 rdhmmdef().

boolean rdhmmlist ( FILE *  fp,
HTK_HMM_INFO hmminfo 
)

Read a HMMList file and build initial logical triphone list.

引数:
fp[in] file pointer
hmminfo[i/o] HMM definition data to store the logical phone list
戻り値:
TRUE on success, FALSE on failure.

rdhmmlist.c69 行で定義されています。

参照元 init_hmminfo().

boolean save_hmmlist_bin ( FILE *  fp,
HTK_HMM_INFO hmminfo 
)

Write hmmlist (logical-to-physical mapping table) and cdset (pseudo phone set) to file.

引数:
fp[in] file pointer to write
hmminfo[in] HMM definition data
戻り値:
TRUE on success, FALSE on failure.

write_binhmmlist.c102 行で定義されています。

参照元 save_hmmlist_bin().

boolean load_hmmlist_bin ( FILE *  fp,
HTK_HMM_INFO hmminfo 
)

Load HMMList and CDSet data from binary file.

引数:
fp[in] file pointer to read
hmminfo[in] HMM definition
戻り値:
TRUE on success, FALSE on failure.

read_binhmmlist.c159 行で定義されています。

参照元 init_hmminfo(), と load_hmmlist_bin().

void put_htk_trans ( FILE *  fp,
HTK_HMM_Trans t 
)

Output transition matrix.

引数:
fp[in] file descriptor
t[in] pointer to a transion matrix

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

参照元 check_hmm_limit(), と put_htk_hmm().

void put_htk_var ( FILE *  fp,
HTK_HMM_Var v 
)

Output variance vector (diagonal).

引数:
fp[in] file descriptor
v[in] pointer to a variance data

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

参照元 put_htk_dens().

void put_htk_dens ( FILE *  fp,
HTK_HMM_Dens d 
)

Output a density information, mean and variance.

引数:
fp[in] file descriptor
d[in] pointer to a density data

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

参照元 put_htk_mpdf().

void put_htk_mpdf ( FILE *  fp,
HTK_HMM_PDF m 
)

Output a mixture component.

引数:
fp[in] file descriptor
m[in] pointer to HMM mixture PDF

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

参照元 put_htk_state().

void put_htk_state ( FILE *  fp,
HTK_HMM_State s 
)

Output a state.

引数:
fp[in] file descriptor
s[in] pointer to HMM state

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

参照元 put_hmm_outprob(), と put_htk_hmm().

void put_htk_hmm ( FILE *  fp,
HTK_HMM_Data h 
)

Output HMM model, number of states and information for each state.

引数:
fp[in] file descriptor
h[in] pointer to HMM model

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

void put_logical_hmm ( FILE *  fp,
HMM_Logical logical 
)

Output logical HMM data and its mapping status.

引数:
fp[in] file descriptor
logical[in] pointer to a logical HMM

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

参照元 print_hmminfo().

void print_hmmdef_info ( FILE *  fp,
HTK_HMM_INFO hmminfo 
)

Output total statistic informations of the HMM definition data.

引数:
fp[in] file descriptor
hmminfo[in] HMM definition data.

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

参照元 print_engine_info().

HTK_HMM_INFO* hmminfo_new ( )

Allocate memory for a new HMM definition data.

戻り値:
pointer to the newly allocated HMM definition data.

init_phmm.c34 行で定義されています。

参照元 initialize_GMM(), initialize_GSHMM(), と initialize_HMM().

boolean hmminfo_free ( HTK_HMM_INFO hmm)

Free memory of an HMM.

引数:
hmm[i/o] HMM definition data
戻り値:
TRUE on success, or FALSE if failed.

init_phmm.c97 行で定義されています。

参照元 initialize_GMM(), initialize_GSHMM(), initialize_HMM(), j_process_am_free(), と j_recog_free().

boolean init_hmminfo ( HTK_HMM_INFO hmminfo,
char *  hmmfilename,
char *  namemapfile,
Value para 
)

Load HTK HMM definition file and HMMList file, and setup phone HMM information.

First try ascii format, then try binary format.

引数:
hmminfo[out] pointer to store all the HMM definition data.
hmmfilename[in] file name of HTK HMM definition file, NULL if not.
namemapfile[in] file name of HMMList mapping file.
para[out] store acoustic analysis condition parameters if exist in hmmfilename.

init_phmm.c128 行で定義されています。

参照元 initialize_GMM(), initialize_GSHMM(), と initialize_HMM().

HTK_HMM_Data* htk_hmmdata_lookup_physical ( HTK_HMM_INFO hmminfo,
char *  keyname 
)

Look up physical (defined in HTK HMM definition file) HMM by its name.

引数:
hmminfo[in] HMM definition data
keyname[in] key string of HMM name
戻り値:
pointer to the found physical HMM, NULL if not found.

hmm_lookup.c63 行で定義されています。

参照元 rdhmmlist().

HMM_Logical* htk_hmmdata_lookup_logical ( HTK_HMM_INFO hmminfo,
char *  keyname 
)

Look up logical HMM by its name.

引数:
hmminfo[in] HMM definition data
keyname[in] key string of HMM name
戻り値:
pointer to the found logical HMM, NULL if not found.

hmm_lookup.c83 行で定義されています。

参照元 get_left_context_HMM(), get_right_context_HMM(), htk_hmm_set_pause_model(), new_str2phseq(), print_hmminfo(), triphone_callback_normal(), triphone_callback_right(), voca_load_htkdict_line(), voca_load_wordlist_line(), と voca_mono2tri().

void hmm_add_physical_to_logical ( HTK_HMM_INFO hmminfo)

Add all physical HMM to logical HMM.

This function should be called only if HMMList is not specified. Julius assumes all the triphones should be explicitly mapped using HMMList file.

引数:
hmminfo[in] HMM definition data.

hmm_lookup.c120 行で定義されています。

参照元 init_hmminfo().

void hmm_add_pseudo_phones ( HTK_HMM_INFO hmminfo)

Update logical HMM list by adding all the possible pseudo monophone and biphone to the list.

引数:
hmminfo[in] HMM definition data.

hmm_lookup.c211 行で定義されています。

参照元 initialize_HMM().

void make_hmm_basephone_list ( HTK_HMM_INFO hmminfo)

Build a list of base phones by gathering center phones of the defined HMM.

引数:
hmminfo[i/o] HMM definition data

chkhmmlist.c48 行で定義されています。

参照元 init_hmminfo().

boolean htk_hmm_has_several_arc_on_edge ( HTK_HMM_INFO hmminfo)

Return TRUE if it has more than one arc from initial state, or to the final state.

In such case, Julius should be run in multi-path version.

引数:
hmminfo[in] HMM definition
戻り値:
TRUE if has, or FALSE if not exist.

check_hmm_restriction.c63 行で定義されています。

参照元 rdhmmdef(), と read_binhmm().

boolean check_hmm_limit ( HTK_HMM_Data dt)

Check if the transition matrix conforms the ristrictions of Julius.

引数:
dt[in] HTK HMM model to check.
戻り値:
TRUE on success, FALSE if the check failed.

check_hmm_restriction.c174 行で定義されています。

参照元 check_all_hmm_limit().

boolean check_all_hmm_limit ( HTK_HMM_INFO hmminfo)

Check all the HMM definitions in a HTK HMM definition data.

引数:
hmminfo[in] HTK HMM data to check.
戻り値:
TRUE if there was no bad models, FALSE if at least one model is bad.

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

参照元 rdhmmdef().

boolean check_hmm_options ( HTK_HMM_INFO hmm)

Check if the required parameter type in this HMM can be handled by Julius.

引数:
hmm[in] HMM definition data
戻り値:
TRUE if Julius supports it, otherwise return FALSE.

check_hmmtype.c38 行で定義されています。

参照元 rdhmmdef().

boolean is_skippable_model ( HTK_HMM_Data d)

モデルが,出力状態を経由せずに入力状態から出力状態へ直接遷移するような 遷移を持つかどうかをチェックする.

引数:
d[in] 論理HMM
戻り値:
入力から出力への直接遷移を持つ場合 TRUE, 持たない場合 FALSE を返す.

check_hmm_restriction.c232 行で定義されています。

参照元 print_hmmdef_info().

boolean guess_if_cd_hmm ( HTK_HMM_INFO hmminfo)

Guess whether the given HMM definition contains context-dependent modeling, just by the naming rule.

引数:
hmminfo[in] target HMM definition
戻り値:
TRUE if the result is context-dependent model, FALSE if context-dependent model.

guess_cdHMM.c42 行で定義されています。

参照元 init_hmminfo().

HMM_Logical* get_right_context_HMM ( HMM_Logical base,
char *  rc_name,
HTK_HMM_INFO hmminfo 
)

Search for right context HMM in logical HMM.

The name of a new right context HMM, given base phone HMM and a right context phone string, will be generated, and search it in the list of logical HMM. If found, return the pointer to the logical HMM.

引数:
base[in] base phone HMM
rc_name[in] right context phone name (allow context-dependent name)
hmminfo[in] HTK HMM definition data
戻り値:
the pointer to the logical HMM, or NULL if not found.

cdhmm.c107 行で定義されています。

参照元 make_phseq(), next_word(), scan_word(), と wordgraph_assign().

HMM_Logical* get_left_context_HMM ( HMM_Logical base,
char *  lc_name,
HTK_HMM_INFO hmminfo 
)

Search for left context HMM in logical HMM.

The name of a new left context HMM, given base phone HMM and a left context phone string, will be generated, and search it in the list of logical HMM. If found, return the pointer to the logical HMM.

引数:
base[in] base phone HMM
lc_name[in] left context phone name (allow context-dependent name)
hmminfo[in] HTK HMM definition data
戻り値:
the pointer to the logical HMM, or NULL if not found.

cdhmm.c129 行で定義されています。

参照元 make_phseq(), outprob_style(), scan_word(), と wordgraph_assign().

void add_right_context ( char  name[],
char *  rc 
)

Generate context-dependent phone name from base phone name and its right context phone name.

The center phone name of the right context name will be appended to the base phone name. If the phone name already has right context, it will be renamed to the new one.

  • Example 1: "a" | "r" -> "a+r"
  • Example 2: "a" | "e-k+i" -> "a+k"
  • Example 3: "k-a" | "e" -> "k-a+e"
  • Example 4: "k-a+e" | "b" -> "k-a+b"
  • Example 5: "k-a+e" | "r-u+k" -> "k-a+u"
引数:
name[i/o] string of phone name to be the base name (will be modified)
rc[in] right context phone name

cdhmm.c46 行で定義されています。

参照元 error_missing_right_triphone(), get_right_context_HMM(), triphone_callback_normal(), と triphone_callback_right().

void add_left_context ( char  name[],
char *  lc 
)

Generate context-dependent phone name from base phone name and its left context phone name.

The center phone name of the left context name will be appended to the base phone name. If the phone name already has left context, it will be renamed to the new one.

引数:
name[i/o] string of phone name to be the base name (will be modified)
lc[in] left context phone name

cdhmm.c73 行で定義されています。

参照元 error_missing_left_triphone(), get_left_context_HMM(), outprob_style(), triphone_callback_left(), と triphone_callback_normal().

char* center_name ( char *  hmmname,
char *  buf 
)

Extract the center phone name and copy to the specified buffer.

引数:
hmmname[in] string from which the center phone name will be extracted
buf[out] the extracted phone name will be written here
戻り値:
the argument buf.

cdhmm.c145 行で定義されています。

参照元 add_left_context(), add_right_context(), build_state2gs(), edit_distance(), hmm_add_pseudo_phones(), make_cdset(), make_hmm_basephone_list(), mark_word_edge(), msock_word_out1(), msock_word_out2(), new_str2phseq(), put_hypo_phoneme(), result_pass1(), と voca_load_wordlist_line().

char* leftcenter_name ( char *  hmmname,
char *  buf 
)

Return "left - center" phone name, modifying buf.

引数:
hmmname[in] context-dependent phone name string
buf[out] resulting phone name
戻り値:
the argument buf.

cdhmm.c176 行で定義されています。

参照元 hmm_add_pseudo_phones(), lcdset_lookup_by_hmmname(), make_cdset(), new_str2phseq(), と voca_load_wordlist_line().

char* rightcenter_name ( char *  hmmname,
char *  buf 
)

Return "center + right" phone name, modifying buf.

引数:
hmmname[in] context-dependent phone name string
buf[out] resulting phone name
戻り値:
the argument buf.

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

参照元 hmm_add_pseudo_phones(), make_cdset(), new_str2phseq(), rcdset_lookup_by_hmmname(), と voca_load_wordlist_line().

boolean regist_cdset ( APATNODE **  root,
HTK_HMM_Data d,
char *  cdname,
BMALLOC_BASE **  mroot 
)

Register a physical HMM as a member of a pseudo phone set.

引数:
root[i/o] root node of HMM search index node.
d[in] a physical defined HMM to be added.
cdname[in] name of the pseudo phone set.
戻り値:
TRUE if newly registered, FALSE if the specified physical HMM already exists in the pseudo phone.

cdset.c211 行で定義されています。

参照元 make_cdset().

boolean make_cdset ( HTK_HMM_INFO hmminfo)

Construct the whole pseudo HMM information, and also add them to the logical Triphone tree.

引数:
hmminfo[i/o] HMM definition data. The generated data will also be stored within this.
戻り値:
TRUE on success, FALSE on failure.

cdset.c324 行で定義されています。

参照元 initialize_HMM().

void put_all_cdinfo ( HTK_HMM_INFO hmminfo)

Output all pseudo phone set information to stdout.

引数:
hmminfo[in] HMM definition data that holds pseudo phone data.

cdset.c195 行で定義されています。

void free_cdset ( APATNODE **  root,
BMALLOC_BASE **  mroot 
)

Remove all the registered category-indexed pseudo state sets.

This function will be called when a grammar is changed to re-build the state sets.

引数:
root[i/o] pointer to hold the root index pointer

cdset.c384 行で定義されています。

参照元 hmminfo_free().

CD_Set* cdset_lookup ( HTK_HMM_INFO hmminfo,
char *  cdstr 
)

Look up for a pseudo phone with the name, and return the content.

引数:
hmminfo[in] HMM information to search for.
cdstr[in] string of pseudo phone name to search.
戻り値:
pointer to the pseudo phone if found, or NULL if not found.

cdset.c114 行で定義されています。

参照元 hmm_add_pseudo_phones_sub(), lcdset_lookup_by_hmmname(), と rcdset_lookup_by_hmmname().

CD_Set* lcdset_lookup_by_hmmname ( HTK_HMM_INFO hmminfo,
char *  hmmname 
)

Look up for a pseudo phone by the "left - center" name of the given phone name.

引数:
hmminfo[in] HMM information to search for.
hmmname[in] string of the phone name.
戻り値:
pointer to the pseudo phone if found, or NULL if not found.

cdset.c134 行で定義されています。

参照元 outprob_style(), と wchmm_add_word().

CD_Set* rcdset_lookup_by_hmmname ( HTK_HMM_INFO hmminfo,
char *  hmmname 
)

Look up for a pseudo phone by the "center + right" name of the given phone name.

引数:
hmminfo[in] HMM information to search for.
hmmname[in] string of the phone name.
戻り値:
pointer to the pseudo phone if found, or NULL if not found.

cdset.c150 行で定義されています。

int hmm_logical_state_num ( HMM_Logical lg)

Generic function to get the number of states in a logical HMM.

引数:
lg[in] logical HMM
戻り値:
the number of states in the logical HMM.

hmm_lookup.c255 行で定義されています。

参照元 adjust_sc_index(), do_align(), get_outtrans_list(), make_phseq(), max_out_arc(), new_make_word_hmm_with_lm(), next_word(), scan_word(), totalstatelen(), voca_set_stats(), wchmm_add_word(), wchmm_duplicate_leafnode(), wchmm_duplicate_state(), と wchmm_link_subword().

HTK_HMM_Trans* hmm_logical_trans ( HMM_Logical lg)

Generic function to get transition matrix of a logical HMM.

引数:
lg[in] logical HMM
戻り値:
pointer to the transition matrix of the logical HMM.

hmm_lookup.c271 行で定義されています。

参照元 adjust_sc_index(), get_outtrans_list(), max_out_arc(), new_make_word_hmm_with_lm(), next_word(), wchmm_add_word(), wchmm_calc_wordend_arc(), wchmm_duplicate_leafnode(), と wchmm_link_subword().

boolean check_param_coherence ( HTK_HMM_INFO hmm,
HTK_Param pinfo 
)

Check if an input parameter type exactly matches that of HMM.

引数:
hmm[in] HMM definition data
pinfo[in] input parameter
戻り値:
TRUE if matches, FALSE if differs.

check_hmmtype.c71 行で定義されています。

参照元 param_check_and_adjust(), と RealTimePipeLinePrepare().

boolean check_param_basetype ( HTK_HMM_INFO hmm,
HTK_Param pinfo 
)

Check if the base type of input parameter matches that of HMM.

引数:
hmm[in] HMM definition data
pinfo[in] input parameter
戻り値:
TRUE if matches, FALSE if differs.

check_hmmtype.c109 行で定義されています。

参照元 param_check_and_adjust().

int param_check_and_adjust ( HTK_HMM_INFO hmminfo,
HTK_Param param,
boolean  vflag 
)

Top function to adjust parameter.

It compares the types for the given parameter param and HMM definition hmminfo. If type is not the same, adjustment will be tried.

引数:
hmminfo[in] HTK HMM definition
param[i/o] input parameter, will be freed if adjustment was performed in this function
vflag[in] if TRUE, output verbose messages
戻り値:
1 on success, 0 if no adjustment needed, or -1 on failure (in case parameter type does not match even by the adjustment).

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

参照元 j_recognize_stream_core().

boolean write_binhmm ( FILE *  fp,
HTK_HMM_INFO hmm,
Value para 
)

Top function to write HMM definition data to a binary file.

引数:
fp[in] file pointer
hmm[in] HMM definition structure to be written
para[in] acoustic analysis parameter, or NULL if not available
戻り値:
TRUE on success, FALSE on failure.

write_binhmm.c992 行で定義されています。

boolean read_binhmm ( FILE *  fp,
HTK_HMM_INFO hmm,
boolean  gzfile_p,
Value para 
)

Top function to read a binary HMM file from fp.

引数:
fp[in] file pointer
hmm[out] HMM definition structure to hold the read models.
gzfile_p[in] TRUE if the file pointer points to a gzip file
para[out] store acoustic parameters if embedded in binhmm (V2)
戻り値:
TRUE on success, FALSE on failure.

read_binhmm.c745 行で定義されています。

参照元 init_hmminfo().