Context-Dependent HMM set

Set of HMM states with the same base phone and state location. More...

Data Structures

struct  CD_State_Set
 Context-dependent state set, equivalent to HTK_HMM_State, part of pseudo phone. More...
struct  CD_State_Set
 Context-dependent state set, equivalent to HTK_HMM_State, part of pseudo phone. More...
struct  _cd_set
 Context-dependent HMM set (called "pseudo") for a logical context. More...
struct  HMM_CDSET_INFO
 Top structure to hold all the HMM sets. More...
struct  _HMM_logical
 Logical HMM to map logical names to physical/pseudo HMM. More...
#define CD_STATE_SET_STEP   10
 CD_State_Set memory allocation step.
static void cdset_init (HTK_HMM_INFO *hmminfo)
static CD_Setcdset_new ()
CD_Setcdset_lookup (HTK_HMM_INFO *hmminfo, char *cdstr)
CD_Setlcdset_lookup_by_hmmname (HTK_HMM_INFO *hmminfo, char *hmmname)
CD_Setrcdset_lookup_by_hmmname (HTK_HMM_INFO *hmminfo, char *hmmname)
static void put_cdset (void *ptr)
void put_all_cdinfo (HTK_HMM_INFO *hmminfo)
boolean regist_cdset (APATNODE **root, HTK_HMM_Data *d, char *cdname)
boolean remove_cdset (HTK_HMM_INFO *hmminfo, char *cdname)
boolean make_cdset (HTK_HMM_INFO *hmminfo)
static void callback_free_lcdset_content (void *arg)
void free_cdset (APATNODE **root)

Typedefs

typedef _cd_set CD_Set
 Context-dependent HMM set (called "pseudo") for a logical context.
typedef _HMM_logical HMM_Logical
 Logical HMM to map logical names to physical/pseudo HMM.

Detailed Description

Set of HMM states with the same base phone and state location.

This structure will be used to handle cross-word triphone on the 1st pass. At a triphone HMM at the edge of a word in the tree lexicon, the state nodes should have a set of HMM states with the same base phone of all triphones at the same location instead of a single state information. This context-dependent HMM set for cross-word triphone is also called as "pseudo" phone in Julius.

When computing the 1st pass, the maximum (or average or N-best average) value from the likelihoods of state set will be taken as the output probability of the states instead of the actual cross-word triphone.

This approximated value will be fixed by re-computation on the 2nd pass.

See also:
htk_hmm.h

libsent/src/hmminfo/cdhmm.c

libsent/src/hmminfo/cdset.c

libsent/src/hmminfo/guess_cdHMM.c


Typedef Documentation

typedef struct _cd_set CD_Set

Context-dependent HMM set (called "pseudo") for a logical context.

Context-dependent HMM set for a logical context (e.g. "a-k", "e+b", "e", each corresponds to triphone list of "a-k+*", "*-e+b", "*-e+*").

typedef struct _HMM_logical HMM_Logical

Logical HMM to map logical names to physical/pseudo HMM.

This data maps logical HMM name to physical (defined) HMM or pseudo HMM. The logical HMM names are basically loaded from HMMList mapping file. Biphone/monophone HMM names, not listed in the HMMList file, are mapped to pseudo phones, which represents the context-dependent HMM set.

For example, if logical biphone HMM name "e-k" is defined in HMM definition file or its mapping is specified in the HMMList file, the Logical HMM name "e-k" will be mapped to the corresponding defined HMM. If "e-k" does not exist in both HMM definition file and HMMList file, triphones whose name matches "e-k+*" will be gathered to phone context-dependent HMM set "e-k", and the logical HMM name "e-k" will be mapped to this HMM set.

The context-dependent HMM is also called a "pseudo" phone in Julius.


Function Documentation

static void cdset_init ( HTK_HMM_INFO hmminfo  )  [static]

Initialize total pseudo HMM information in the given HMM definition data.

Parameters:
hmminfo [i/o] HTK HMM definitions

Definition at line 87 of file cdset.c.

Referenced by make_cdset().

static CD_Set* cdset_new (  )  [static]

Allocate a CD_Set data for a new pseudo phone set.

Returns:
pointer to newly allocated CD_Set.

Definition at line 98 of file cdset.c.

Referenced by regist_cdset().

CD_Set* cdset_lookup ( HTK_HMM_INFO hmminfo,
char *  cdstr 
)

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

Parameters:
hmminfo [in] HMM information to search for.
cdstr [in] string of pseudo phone name to search.
Returns:
pointer to the pseudo phone if found, or NULL if not found.

Definition at line 112 of file cdset.c.

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

Parameters:
hmminfo [in] HMM information to search for.
hmmname [in] string of the phone name.
Returns:
pointer to the pseudo phone if found, or NULL if not found.

Definition at line 132 of file cdset.c.

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

Parameters:
hmminfo [in] HMM information to search for.
hmmname [in] string of the phone name.
Returns:
pointer to the pseudo phone if found, or NULL if not found.

Definition at line 148 of file cdset.c.

static void put_cdset ( void *  ptr  )  [static]

Output text information of a pseudo phone to stdout.

Parameters:
ptr [in] pointer to a pseudo phone set.

Definition at line 162 of file cdset.c.

Referenced by put_all_cdinfo().

void put_all_cdinfo ( HTK_HMM_INFO hmminfo  ) 

Output all pseudo phone set information to stdout

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

Definition at line 190 of file cdset.c.

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

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

Parameters:
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.
Returns:
TRUE if newly registered, FALSE if the specified physical HMM already exists in the pseudo phone.

Definition at line 206 of file cdset.c.

Referenced by make_cdset().

boolean remove_cdset ( HTK_HMM_INFO hmminfo,
char *  cdname 
)

Remove an pseudo phone set entry from index tree

Parameters:
hmminfo 
cdname 
Returns:

Definition at line 318 of file cdset.c.

boolean make_cdset ( HTK_HMM_INFO hmminfo  ) 

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

Parameters:
hmminfo [i/o] HMM definition data. The generated data will also be stored within this.
Returns:
TRUE on success, FALSE on failure.

Definition at line 351 of file cdset.c.

Referenced by initialize_HMM().

static void callback_free_lcdset_content ( void *  arg  )  [static]

callback for aptree function to free the content of pseudo phone set.

Parameters:
arg [in] pointer to the pseudo phone set to be free

Definition at line 388 of file cdset.c.

Referenced by free_cdset().

void free_cdset ( APATNODE **  root  ) 

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.

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

Definition at line 410 of file cdset.c.

Referenced by hmminfo_free().


Generated on Tue Dec 26 16:18:28 2006 for Julius by  doxygen 1.5.0