libsent/include/sent/hmm.h File Reference

Hidden Marcov Model for recognition. More...

#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  SEGTOKEN
 Token definition for viterbi segmentation. More...

Functions

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.


Detailed Description

Hidden Marcov Model for recognition.

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.

Author:
Akinobu LEE
Date:
Thu Feb 10 14:54:06 2005
Revision
1.1.1.1

Definition in file hmm.h.


Function Documentation

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.

Parameters:
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
Returns:
newly allocated HMM instance generated from the given data.

Definition at line 356 of file mkwhmm.c.

Referenced by do_align(), and 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.

Parameters:
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.
Returns:
newly allocated HMM instance generated from the given data.

Definition at line 99 of file mkwhmm.c.

Referenced by new_make_word_hmm().

void free_hmm ( HMM d  ) 

Free an HMM instance.

Parameters:
d [in] HMM instance to free

Definition at line 367 of file mkwhmm.c.

Referenced by do_align(), and 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.

Parameters:
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.
Returns:
the total acoustic score for the whole input.

Definition at line 53 of file vsegment.c.

Referenced by 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.

Parameters:
wrk [i/o] HMM computation work area
t [in] input frame
hmmstate [in] HMM state
param [in] input parameter data
Returns:
the computed log output probability.

Definition at line 375 of file outprob.c.

Referenced by scan_word(), and viterbi_segment().

void put_hmm_arc ( FILE *  fp,
HMM d 
)

Output transition arcs of an HMM instance.

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

Definition at line 175 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.

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

Definition at line 200 of file put_htkdata_info.c.

Referenced by put_hmm().

void put_hmm ( FILE *  fp,
HMM d 
)

Output an HMM instance.

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

Definition at line 223 of file put_htkdata_info.c.


Generated on Tue Dec 18 16:01:36 2007 for Julius by  doxygen 1.5.4