libsent/src/hmminfo/cdhmm.c File Reference

Sub functions to access context dependent HMM from phones. More...

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

Include dependency graph for cdhmm.c:

Go to the source code of this file.

Functions

void add_right_context (char name[], char *rc)
 Generate context-dependent phone name from base phone name and its right context phone name.
void add_left_context (char name[], char *lc)
 Generate context-dependent phone name from base phone name and its left context phone name.
HMM_Logicalget_right_context_HMM (HMM_Logical *base, char *rc_name, HTK_HMM_INFO *hmminfo)
 Search for right context HMM in logical HMM.
HMM_Logicalget_left_context_HMM (HMM_Logical *base, char *lc_name, HTK_HMM_INFO *hmminfo)
 Search for left context HMM in logical HMM.
char * center_name (char *hmmname, char *buf)
char * leftcenter_name (char *hmmname, char *buf)
char * rightcenter_name (char *hmmname, char *buf)

Variables

static char gbuf [MAX_HMMNAME_LEN]
 Work area for get_{right|left}_context_HMM.


Detailed Description

Sub functions to access context dependent HMM from phones.

Author:
Akinobu LEE
Date:
Tue Feb 15 17:33:47 2005
Revision
1.3

Definition in file cdhmm.c.


Function Documentation

void add_right_context ( char  name[],
char *  rc 
)

Generate context-dependent phone name from base phone name and its right context phone name.

The center phone name of the right context name will be appended to the base phone name. If the phone name already has right context, it will be renamed to the new one.

Parameters:
name [i/o] string of phone name to be the base name (will be modified)
rc [in] right context phone name

Definition at line 45 of file cdhmm.c.

Referenced by error_missing_right_triphone(), get_right_context_HMM(), triphone_callback_normal(), and triphone_callback_right().

void add_left_context ( char  name[],
char *  lc 
)

Generate context-dependent phone name from base phone name and its left context phone name.

The center phone name of the left context name will be appended to the base phone name. If the phone name already has left context, it will be renamed to the new one.

Parameters:
name [i/o] string of phone name to be the base name (will be modified)
lc [in] left context phone name

Definition at line 72 of file cdhmm.c.

Referenced by error_missing_left_triphone(), get_left_context_HMM(), outprob_style(), triphone_callback_left(), and triphone_callback_normal().

HMM_Logical* get_right_context_HMM ( HMM_Logical base,
char *  rc_name,
HTK_HMM_INFO hmminfo 
)

Search for right context HMM in logical HMM.

The name of a new right context HMM, given base phone HMM and a right context phone string, will be generated, and search it in the list of logical HMM. If found, return the pointer to the logical HMM.

Parameters:
base [in] base phone HMM
rc_name [in] right context phone name (allow context-dependent name)
hmminfo [in] HTK HMM definition data
Returns:
the pointer to the logical HMM, or NULL if not found.

Definition at line 106 of file cdhmm.c.

Referenced by make_phseq(), next_word(), and scan_word().

HMM_Logical* get_left_context_HMM ( HMM_Logical base,
char *  lc_name,
HTK_HMM_INFO hmminfo 
)

Search for left context HMM in logical HMM.

The name of a new left context HMM, given base phone HMM and a left context phone string, will be generated, and search it in the list of logical HMM. If found, return the pointer to the logical HMM.

Parameters:
base [in] base phone HMM
lc_name [in] left context phone name (allow context-dependent name)
hmminfo [in] HTK HMM definition data
Returns:
the pointer to the logical HMM, or NULL if not found.

Definition at line 128 of file cdhmm.c.

Referenced by make_phseq(), outprob_style(), and scan_word().

char* center_name ( char *  hmmname,
char *  buf 
)

Extract the center phone name and copy to the specified buffer.

Parameters:
hmmname [in] string from which the center phone name will be extracted
buf [out] the extracted phone name will be written here
Returns:
the argument buf.

Definition at line 144 of file cdhmm.c.

Referenced by add_left_context(), add_right_context(), hmm_add_pseudo_phones(), make_cdset(), make_hmm_basephone_list(), mark_word_edge(), msock_word_out1(), msock_word_out2(), put_hypo_phoneme(), and ttyout_pass1_final().

char* leftcenter_name ( char *  hmmname,
char *  buf 
)

Return "left - center" phone name, modifying buf.

Parameters:
hmmname [in] context-dependent phone name string
buf [out] resulting phone name
Returns:
the argument buf.

Definition at line 175 of file cdhmm.c.

Referenced by hmm_add_pseudo_phones(), lcdset_lookup_by_hmmname(), and make_cdset().

char* rightcenter_name ( char *  hmmname,
char *  buf 
)

Return "center + right" phone name, modifying buf.

Parameters:
hmmname [in] context-dependent phone name string
buf [out] resulting phone name
Returns:
the argument buf.

Definition at line 197 of file cdhmm.c.

Referenced by hmm_add_pseudo_phones(), make_cdset(), and rcdset_lookup_by_hmmname().


Generated on Tue Dec 26 16:17:51 2006 for Julius by  doxygen 1.5.0