Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

cdset.c File Reference

Generate and manage the pseudo HMM set. More...

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

Include dependency graph for cdset.c:

Go to the source code of this file.

Defines

#define CD_STATE_SET_STEP   10
 CD_State_Set memory allocation step.

Functions

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)


Detailed Description

Generate and manage the pseudo HMM set.

Author:
Akinobu LEE
Date:
Tue Feb 15 17:58:54 2005
"Pseudo %HMM" is mainly for a substitution for unknown context-dependent biphone and monophone HMM that has not been defined in HTK HMM definition and HMMList mapping file. They are used mainly in the cross-word triphone computation on the 1st pass.

Julius first generates a list of possible biphone and monophone after reading HTK HMM definition file and HMMList logical name mapping file. It then generate CD_Set structure for each possible biphone and monophones by parsing all the HMM definition to find the same context as each phones.

For example, the triphones like "a-k+e", "a-k+b", "a-k+a" will be grouped as pseudo phone set "a-k". A pseudo phone "k" will contain all triphone variants of the same base phone "k". This generated pseudo HMM sets are stored in cdset_info in HTK_HMM_INFO.

Then, the pseudo phones, whose names (biphone or monophone) do not appear in both of the HTK HMM definitions and HMMList mapping file, will be added as aliases to unspecified phones in the HMM index tree. If biphones or monophones are explicitly defined in HMM definition or HMMList file, they will be used instead of this pseudo phone.

Revision
1.1.1.1

Definition in file cdset.c.


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().


Generated on Tue Mar 28 16:03:04 2006 for Julius by  doxygen 1.4.2