Julius 4.2
データ構造 | 関数
libsent/include/sent/hmm.h

認識計算用の Hidden Marcov Model [詳細]

#include <sent/stddefs.h>
#include <sent/htk_hmm.h>
#include <sent/htk_param.h>
#include <sent/hmm_calc.h>

ソースコードを見る。

データ構造

struct  A_CELL
 Transition arc of HMM state. [詳細]
struct  HMM_STATE
 HMM State [詳細]
struct  HMM
 HMM state sequence [詳細]
struct  SEGTOKEN
 Token definition for viterbi segmentation. [詳細]

関数

HMMnew_make_word_hmm (HTK_HMM_INFO *, HMM_Logical **, int, boolean *)
 Make a HMM instance for recognition from phoneme sequence.
HMMnew_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.

説明

認識計算用の Hidden Marcov Model

このファイルでは, 認識におけるHMMの構造体を定義しています. 認識時には, 辞書および音響モデル構造体 (htk_hmm.h) を元に 必要な単語HMMや木構造化辞書がこの構造体を用いて構築され, 音響尤度計算はこの上で行われます.

作者:
Akinobu LEE
日付:
Thu Feb 10 14:54:06 2005
Revision:
1.4

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
戻り値:
newly allocated HMM instance generated from the given data.

mkwhmm.c356 行で定義されています。

参照元 do_align(), と 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.
戻り値:
newly allocated HMM instance generated from the given data.

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

参照元 new_make_word_hmm().

void free_hmm ( HMM d)

Free an HMM instance.

引数:
d[in] HMM instance to free

mkwhmm.c367 行で定義されています。

参照元 do_align(), と scan_word().

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.
戻り値:
the total acoustic score for the whole input.

vsegment.c53 行で定義されています。

参照元 do_align().

LOGPROB outprob ( HMMWork wrk,
int  t,
HMM_STATE hmmstate,
HTK_Param param 
)

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
戻り値:
the computed log output probability.

outprob.c378 行で定義されています。

参照元 scan_word(), と 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.

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

参照元 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.

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

参照元 put_hmm().

void put_hmm ( FILE *  fp,
HMM d 
)

Output an HMM instance.

引数:
fp[in] file descriptor
d[in] pointer to a HMM instance.

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