#include <sent/stddefs.h>
#include <sent/htk_hmm.h>
#include <sent/ptree.h>
Go to the source code of this file.
Functions | |
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. | |
HMM_Logical * | htk_hmmdata_lookup_logical (HTK_HMM_INFO *hmminfo, char *keyname) |
Look up logical HMM by its name. | |
static void | hmm_count_logical_num (HTK_HMM_INFO *hmminfo) |
Count the number of logical HMM and store it. | |
void | hmm_add_physical_to_logical (HTK_HMM_INFO *hmminfo) |
Add all physical HMM to logical HMM. | |
static boolean | hmm_add_pseudo_phones_sub (HTK_HMM_INFO *hmminfo, char *name) |
Add a pseudo monophone and pseudo biphone 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. | |
int | hmm_logical_state_num (HMM_Logical *lg) |
Generic function to get the number of states in a logical HMM. | |
HTK_HMM_Trans * | hmm_logical_trans (HMM_Logical *lg) |
Generic function to get transition matrix of a logical HMM. | |
Variables | |
static int | add_count |
Number of pseudo phones added to logical HMM list. |
These function is for searching HMM definition from phone name like "g-u+i".
The result is pointer to the corresponding logical HMM (HMM_Logical). The logical HMM holds either pointer to an actual HMM data defined in HTK HMM definition, or pointer to a pseudo HMM set when the query name is biphone or monophone and they are not defined in either HTK HMM definition or HMMList mapping file.
Adding physical HMM defined in HTK HMM definitions and pseudo phones to the logical HMM mapping function is also done here.
Definition in file hmm_lookup.c.
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 |
Definition at line 63 of file hmm_lookup.c.
Referenced by 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 |
Definition at line 83 of file hmm_lookup.c.
Referenced by 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(), and voca_load_wordlist_line().
static void hmm_count_logical_num | ( | HTK_HMM_INFO * | hmminfo | ) | [static] |
Count the number of logical HMM and store it.
hmminfo | [in] HMM definition data. |
Definition at line 100 of file hmm_lookup.c.
Referenced by hmm_add_physical_to_logical(), and hmm_add_pseudo_phones().
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. |
Definition at line 120 of file hmm_lookup.c.
Referenced by init_hmminfo().
static boolean hmm_add_pseudo_phones_sub | ( | HTK_HMM_INFO * | hmminfo, | |
char * | name | |||
) | [static] |
Add a pseudo monophone and pseudo biphone to logical HMM.
Logical HMM specified in HMMlist precedes pseudo HMM: if some monophones or biphones are already defined in HMMList, pseudo HMM will not be added.
hmminfo | [in] HMM definition data. | |
name | [in] name of the pseudo phone to add. |
Definition at line 170 of file hmm_lookup.c.
Referenced by hmm_add_pseudo_phones().
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. |
Definition at line 212 of file hmm_lookup.c.
Referenced by initialize_HMM().
int hmm_logical_state_num | ( | HMM_Logical * | lg | ) |
Generic function to get the number of states in a logical HMM.
lg | [in] logical HMM |
Definition at line 257 of file hmm_lookup.c.
Referenced by 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(), and 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 |
Definition at line 273 of file hmm_lookup.c.
Referenced by 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(), and wchmm_link_subword().