#include <sent/stddefs.h>
#include <sent/htk_hmm.h>
#include <sent/htk_param.h>
#include <sent/hmm_calc.h>
Go to the source code of this file.
Data Structures | |
struct | _a_cell |
Transition arc of HMM state. More... | |
struct | HMM_STATE |
HMM State More... | |
struct | HMM |
HMM state sequence More... | |
struct | _seg_token |
Token definition for viterbi segmentation. More... | |
Typedefs | |
typedef _a_cell | A_CELL |
Transition arc of HMM state. | |
typedef _seg_token | SEGTOKEN |
Token definition for viterbi segmentation. | |
Functions | |
HMM * | new_make_word_hmm (HTK_HMM_INFO *, HMM_Logical **, int, boolean *) |
Make a HMM instance for recognition from phoneme sequence. | |
HMM * | new_make_word_hmm_with_lm (HTK_HMM_INFO *, HMM_Logical **, int, boolean *, LOGPROB *) |
Make a HMM instance for recognition from phoneme sequence, with connection probabiliry given for each phoneme. | |
void | free_hmm (HMM *) |
Free an HMM instance. | |
LOGPROB | viterbi_segment (HMM *hmm, HTK_Param *param, HMMWork *wrk, boolean multipath, int *endstates, int ulen, int **id_ret, int **seg_ret, LOGPROB **uscore_ret, int *retlen) |
Perform Viterbi alignment. | |
LOGPROB | outprob (HMMWork *wrk, int t, HMM_STATE *hmmstate, HTK_Param *param) |
Top function to compute the output probability of a HMM state. | |
void | put_hmm_arc (FILE *fp, HMM *d) |
Output transition arcs of an HMM instance. | |
void | put_hmm_outprob (FILE *fp, HMM *d) |
Output output probability information of an HMM instance. | |
void | put_hmm (FILE *fp, HMM *d) |
Output an HMM instance. |
This file defines HMM instance structure for recognition. When recognition, the required word HMM or tree lexicon will be built using these structures referencing word dictionary and HTK HMM Acoustic Model (defined in htk_hmm.h), and actual likelihood computation.
Definition in file hmm.h.
HMM* new_make_word_hmm | ( | HTK_HMM_INFO * | hmminfo, | |
HMM_Logical ** | hdseq, | |||
int | hdseqlen, | |||
boolean * | has_sp | |||
) |
Make a HMM instance for recognition from phoneme sequence.
hmminfo | [in] HTK HMM definitions data | |
hdseq | [in] phoneme sequence as given by pointer list of logical HMM | |
hdseqlen | [in] length of above | |
has_sp | [in] indicates where short-pause insertion is possible |
Definition at line 356 of file mkwhmm.c.
Referenced by scan_word().
HMM* new_make_word_hmm_with_lm | ( | HTK_HMM_INFO * | hmminfo, | |
HMM_Logical ** | hdseq, | |||
int | hdseqlen, | |||
boolean * | has_sp, | |||
LOGPROB * | lscore | |||
) |
Make a HMM instance for recognition from phoneme sequence, with connection probabiliry given for each phoneme.
hmminfo | [in] HTK HMM definitions data | |
hdseq | [in] phoneme sequence as given by pointer list of logical HMM | |
hdseqlen | [in] length of above | |
has_sp | [in] indicates where short-pause insertion is possible | |
lscore | [in] list of log probability to be added at the emitting transition of each phoneme, or NULL if not needed. |
Definition at line 99 of file mkwhmm.c.
Referenced by new_make_word_hmm().
void free_hmm | ( | HMM * | d | ) |
LOGPROB viterbi_segment | ( | HMM * | hmm, | |
HTK_Param * | param, | |||
HMMWork * | wrk, | |||
boolean | multipath, | |||
int * | endstates, | |||
int | ulen, | |||
int ** | id_ret, | |||
int ** | seg_ret, | |||
LOGPROB ** | uscore_ret, | |||
int * | slen_ret | |||
) |
Perform Viterbi alignment.
This function performs viterbi alignment for the given sentence HMM, input parameter and unit definition. Any segmentatino unit (word, phoneme state, etc.) is allowed: the segmentation unit should be specified by specifying a list of state id which are the end of each unit. For example, if you want to obtain phoneme alignment, the list of state number that exist at the end of phones should be specified by endstates.
hmm | [in] sentence HMM to be matched | |
param | [in] input parameter data | |
wrk | [i/o] HMM computation work area | |
multipath | [in] TRUE if need multi-path handling | |
endstates | [in] list of state id that corrsponds to the ends of units | |
ulen | [in] total number of units in the hmm | |
id_ret | [out] Pointer to store the newly allocated array of the resulting id sequence of units on the best path. | |
seg_ret | [out] Pointer to store the newly allocated array of the resulting end frame of each unit on the best path. | |
uscore_ret | [out] Pointer to store the newly allocated array of the resulting score at the end frame of each unit on the best path. | |
slen_ret | [out] Pointer to store the total number of units on the best path. |
Definition at line 53 of file vsegment.c.
Top function to compute the output probability of a HMM state.
wrk | [i/o] HMM computation work area | |
t | [in] input frame | |
hmmstate | [in] HMM state | |
param | [in] input parameter data |
Definition at line 378 of file outprob.c.
Referenced by viterbi_segment().
void put_hmm_arc | ( | FILE * | fp, | |
HMM * | d | |||
) |
Output transition arcs of an HMM instance.
fp | [in] file descriptor | |
d | [in] pointer to a HMM instance. |
Definition at line 212 of file put_htkdata_info.c.
Referenced by put_hmm().
void put_hmm_outprob | ( | FILE * | fp, | |
HMM * | d | |||
) |
Output output probability information of an HMM instance.
fp | [in] file descriptor | |
d | [in] pointer to a HMM instance. |
Definition at line 237 of file put_htkdata_info.c.
Referenced by put_hmm().
void put_hmm | ( | FILE * | fp, | |
HMM * | d | |||
) |
Output an HMM instance.
fp | [in] file descriptor | |
d | [in] pointer to a HMM instance. |
Definition at line 260 of file put_htkdata_info.c.