srch_flat_fwd_internal.h File Reference

#include <stdio.h>
#include <profile.h>
#include <s3types.h>
#include <lm.h>
#include <kbcore.h>
#include <vithist.h>
#include <word_ugprob.h>
#include <word_graph.h>
#include <whmm.h>
#include <hmm.h>
#include <ctxt_table.h>
#include <dict.h>

Go to the source code of this file.

Classes

struct  fwd_dbg_t
struct  backoff_t
struct  word_cand_s
struct  srch_FLAT_FWD_graph_s

Typedefs

typedef struct word_cand_s word_cand_t
typedef struct
srch_FLAT_FWD_graph_s 
srch_FLAT_FWD_graph_t

Functions

void build_word_cand_cf (int32 cf, dict_t *dict, s3wid_t *wcand_cf, int32 word_cand_win, word_cand_t **wcand)
int32 word_cand_load (FILE *fp, word_cand_t **wcand, dict_t *dict, char *uttid)
void word_cand_free (word_cand_t **wcand)
int32 whmm_eval (srch_FLAT_FWD_graph_t *fwg, int32 *senscr)
void dump_all_whmm (srch_FLAT_FWD_graph_t *fwg, whmm_t **whmm, int32 n_frm, int32 *senscr)
void dump_all_word (srch_FLAT_FWD_graph_t *fwg, whmm_t **whmm)
void whmm_renorm (srch_FLAT_FWD_graph_t *fwg, whmm_t **whmm, int32 bestscr)
void whmm_transition (srch_FLAT_FWD_graph_t *fwg, whmm_t **whmm, int32 w, whmm_t *h)
void word_enter (srch_FLAT_FWD_graph_t *fwg, s3wid_t w, int32 score, s3latid_t l, s3cipid_t lc)
void whmm_exit (srch_FLAT_FWD_graph_t *fwg, whmm_t **whmm, latticehist_t *lathist, int32 thresh, int32 wordthresh, int32 phone_penalty)
void word_trans (srch_FLAT_FWD_graph_t *fwg, whmm_t **whmm, latticehist_t *lathist, int32 thresh, int32 phone_penalty)
void flat_fwd_dag_add_fudge_edges (srch_FLAT_FWD_graph_t *fwg, dag_t *dagp, int32 fudge, int32 min_ef_range, void *hist, dict_t *dict)

Typedef Documentation

typedef struct word_cand_s word_cand_t

Function Documentation

void build_word_cand_cf ( int32  cf,
dict_t dict,
s3wid_t wcand_cf,
int32  word_cand_win,
word_cand_t **  wcand 
)

Build array of candidate words that start around the current frame (cf). Note: filler words are not in this list since they are always searched (see word_trans).

Parameters:
cf Current frame
dict The dictionary
wcand_cf The array of word candidate
word_cand_win In frame f, candidate words in input lattice from frames [(f - word_cand_win) .. (f + word_cand_win)] will be the actual candidates to be started(entered)

References BAD_S3WID, dict_t::filler_start, dict_t::finishwid, dict_t::n_word, word_cand_s::next, S3_MAX_FRAMES, dict_t::startwid, and word_cand_s::wid.

Referenced by word_trans().

void dump_all_whmm ( srch_FLAT_FWD_graph_t fwg,
whmm_t **  whmm,
int32  n_frm,
int32 *  senscr 
)
void dump_all_word ( srch_FLAT_FWD_graph_t fwg,
whmm_t **  whmm 
)
void flat_fwd_dag_add_fudge_edges ( srch_FLAT_FWD_graph_t fwg,
dag_t dagp,
int32  fudge,
int32  min_ef_range,
void *  hist,
dict_t dict 
)
int32 whmm_eval ( srch_FLAT_FWD_graph_t fwg,
int32 *  senscr 
)
void whmm_exit ( srch_FLAT_FWD_graph_t fwg,
whmm_t **  whmm,
latticehist_t lathist,
int32  thresh,
int32  wordthresh,
int32  phone_penalty 
)
void whmm_renorm ( srch_FLAT_FWD_graph_t fwg,
whmm_t **  whmm,
int32  bestscr 
)
void whmm_transition ( srch_FLAT_FWD_graph_t fwg,
whmm_t **  whmm,
int32  w,
whmm_t h 
)

Transition from hmm h into the next appropriate one for word w. Threshold check for incoming score already completed. The next HMM may be the last triphone for the word w, in which case, instantiate multiple instances corresponding cross-word triphone modelling for all right context ciphones.

References dictword_t::ciphone, srch_FLAT_FWD_graph_s::ctxt, ctxt_table_word_int_ssid, FALSE, get_rcssid(), hmm_enter(), hmm_in_score, hmm_out_history, hmm_out_score, srch_FLAT_FWD_graph_s::hmmctx, srch_FLAT_FWD_graph_s::kbcore, kbcore_dict, kbcore_tmat, srch_FLAT_FWD_graph_s::n_frm, word_ugprob_s::next, dictword_t::pronlen, whmm_alloc(), and dict_t::word.

Referenced by whmm_exit().

void word_cand_free ( word_cand_t **  wcand  ) 

Free word candidate

Parameters:
wcand list of word candidate to free

References word_cand_s::next, word_ugprob_s::next, and S3_MAX_FRAMES.

int32 word_cand_load ( FILE *  fp,
word_cand_t **  wcand,
dict_t dict,
char *  uttid 
)

Load word candidate into a list

Parameters:
fp An initialized for inputfile poiner
wcand list of word candidate
dict The dictionary
uttid The ID of an utterance

References dict_basewid, dict_wordid(), word_cand_s::next, NOT_S3WID, S3_MAX_FRAMES, and word_cand_s::wid.

void word_enter ( srch_FLAT_FWD_graph_t fwg,
s3wid_t  w,
int32  score,
s3latid_t  l,
s3cipid_t  lc 
)

Transition into a word w. Since we transition into the first phone position, the triphone model must be derived from the incoming left context ciphone. The first state of the whmm instance inherits this triphone model and propagates it along with the score. If the first phone is also the last (single-phone word), we must also model all possible right context ciphones, by instantiating separate whmm models for each rc.

References dictword_t::ciphone, ct_get_rc_nssid(), srch_FLAT_FWD_graph_s::ctxt, ctxt_table_left_ctxt_ssid, ctxt_table_single_phone_ssid, get_lc_cimap(), hmm_enter(), hmm_in_score, hmm_is_mpx, hmm_mpx_ssid, hmm_nonmpx_ssid, srch_FLAT_FWD_graph_s::hmmctx, srch_FLAT_FWD_graph_s::kbcore, kbcore_dict, kbcore_tmat, ctxt_table_t::lrcssid, srch_FLAT_FWD_graph_s::n_frm, dictword_t::pronlen, xwdssid_t::ssid, TRUE, srch_FLAT_FWD_graph_s::whmm, whmm_alloc(), and dict_t::word.

Referenced by word_trans().

void word_trans ( srch_FLAT_FWD_graph_t fwg,
whmm_t **  whmm,
latticehist_t lathist,
int32  thresh,
int32  phone_penalty 
)

Generated on 7 Mar 2010 by  doxygen 1.6.1