libjulius/src/outprob_style.c File Reference

Compute output probability of a state (1st pass). More...

#include <julius/julius.h>

Go to the source code of this file.

Functions

void outprob_style_cache_init (WCHMM_INFO *wchmm)
 Initialize cache for triphone changing on every word head.
CD_Setlcdset_lookup_with_category (WCHMM_INFO *wchmm, HMM_Logical *hmm, WORD_ID category)
 Lookup a word-end triphone set (aka pseudo phone set) with category id for grammar recognition.
static void lcdset_register_with_category (WCHMM_INFO *wchmm, HMM_Logical *hmm, WORD_ID category)
 Make a category-indexed context-dependent (pseudo) state set for word ends.
void lcdset_register_with_category_all (WCHMM_INFO *wchmm)
 Generate all possible category-indexed pseudo phone sets for grammar recognition.
void lcdset_remove_with_category_all (WCHMM_INFO *wchmm)
 Remove all the registered category-indexed pseudo state sets.
LOGPROB outprob_style (WCHMM_INFO *wchmm, int node, int last_wid, int t, HTK_Param *param)
 Calculate output probability on a tree lexion node.
void error_missing_right_triphone (HMM_Logical *base, char *rc_name)
 Triphone error message for right context.
void error_missing_left_triphone (HMM_Logical *base, char *lc_name)
 Triphone error message for left context.


Detailed Description

Compute output probability of a state (1st pass).

These functions compute the output probability of an input vector from a state on the lexicon tree.

When using triphone acoustic model, the cross-word triphone handling is done here. The head and tail phoneme of every words has corresponding pseudo phone set on the tree lexicon, so the actual likelihood computation will be done as the following:

  1. word-internal: compute as normal.
  2. Word head phone: the correct triphone phone, according to the last word information on the passing token, will be dynamically assigned to compute the cross-word dependency.
  3. Word tail phone: all the states in the pseudo phone set (they are states of triphones that has the same left context as the word end) will be computed, and use
  4. word with only one state: both of above should be considered.

To denote which operation to do for a state, AS_Style ID is assigned to each state.

The triphone transformation, that will be performed on the state of 2 and 4 above, will be cached on the tree lxicon by each state per frame, to suppress computation overhead.

Author:
Akinobu Lee
Date:
Mon Aug 22 17:14:26 2005
Revision
1.4

Definition in file outprob_style.c.


Function Documentation

void outprob_style_cache_init ( WCHMM_INFO wchmm  ) 

Initialize cache for triphone changing on every word head.

Parameters:
wchmm [i/o] tree lexicon

Definition at line 100 of file outprob_style.c.

Referenced by init_nodescore().

Here is the caller graph for this function:

CD_Set* lcdset_lookup_with_category ( WCHMM_INFO wchmm,
HMM_Logical hmm,
WORD_ID  category 
)

Lookup a word-end triphone set (aka pseudo phone set) with category id for grammar recognition.

Parameters:
wchmm [in] word lexicon tree
hmm [in] logical HMM of word end phone
category [in] belonging category id of the word
Returns:
pointer to the corresponding phone set if found, or NULL if not found.

Definition at line 144 of file outprob_style.c.

Referenced by lcdset_register_with_category(), outprob_style(), and wchmm_add_word().

Here is the caller graph for this function:

static void lcdset_register_with_category ( WCHMM_INFO wchmm,
HMM_Logical hmm,
WORD_ID  category 
) [static]

Make a category-indexed context-dependent (pseudo) state set for word ends.

In Julian, the word-end pseudo triphone set can be shrinked by using the category-pair constraint, since the number of possible right-context phones on the word end will be smaller than all phone. This shrinking not only saves computation time but also improves recognition since the approximated value will be closer to the actual value.

For example, if a word belongs to category ID 38 and has a phone "a-k" at word end, CD_Set "a-k::38" is generated and assigned to the phone instead of normal CD_Set "a-k". The "a-k::38" set consists of triphones whose right context are the beginning phones within possibly fllowing categories. These will be separated from the normal pseudo phone set.

Parameters:
wchmm [i/o] tree lexicon
hmm [in] logical HMM at the end of a word, of which the category-indexed pseudo state set will be generated.
category [in] category ID of the word.

Definition at line 206 of file outprob_style.c.

Referenced by lcdset_register_with_category_all().

void lcdset_register_with_category_all ( WCHMM_INFO wchmm  ) 

Generate all possible category-indexed pseudo phone sets for grammar recognition.

Parameters:
wchmm [i/o] tree lexicon

Definition at line 267 of file outprob_style.c.

Referenced by build_wchmm(), and build_wchmm2().

Here is the caller graph for this function:

void lcdset_remove_with_category_all ( WCHMM_INFO wchmm  ) 

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:
wchmm [i/o] lexicon tree information

Definition at line 317 of file outprob_style.c.

LOGPROB outprob_style ( WCHMM_INFO wchmm,
int  node,
int  last_wid,
int  t,
HTK_Param param 
)

Calculate output probability on a tree lexion node.

This function calculates log output probability of an input vector on time frame t in input paramter param at a node on tree lexicon.

Parameters:
wchmm [in] tree lexicon structure
node [in] node ID to compute the output probability
last_wid [in] word ID of last word hypothesis (used when the node is within the word beginning phone and triphone is used.
t [in] time frame of input vector in param to compute.
param [in] input parameter structure
Returns:
the computed log probability.

< Local workarea for HMM name conversion

Definition at line 354 of file outprob_style.c.

Referenced by bt_discount_pescore(), get_back_trellis_proceed(), and init_nodescore().

Here is the caller graph for this function:

void error_missing_right_triphone ( HMM_Logical base,
char *  rc_name 
)

Triphone error message for right context.

Output error message when a triphone with the specified right context is not defined.

Parameters:
base [in] base triphone
rc_name [in] name of right context phone

< Local workarea for HMM name conversion

Definition at line 520 of file outprob_style.c.

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

Here is the caller graph for this function:

void error_missing_left_triphone ( HMM_Logical base,
char *  lc_name 
)

Triphone error message for left context.

Output error message when a triphone with the specified right context is not defined.

Parameters:
base [in] base triphone
lc_name [in] name of left context phone

< Local workarea for HMM name conversion

Definition at line 552 of file outprob_style.c.

Referenced by outprob_style(), and scan_word().

Here is the caller graph for this function:


Generated on Thu Jul 23 12:14:02 2009 for Julius by  doxygen 1.5.1