#include <julius.h>
Include dependency graph for backtrellis.c:
Go to the source code of this file.
Functions | |
void | bt_init (BACKTRELLIS *bt) |
void | bt_prepare (BACKTRELLIS *bt) |
void | bt_store (BACKTRELLIS *bt, TRELLIS_ATOM *tatom) |
void | bt_relocate_rw (BACKTRELLIS *bt) |
void | bt_discount_pescore (WCHMM_INFO *wchmm, BACKTRELLIS *bt, HTK_Param *param) |
static int | compare_wid (TRELLIS_ATOM **a, TRELLIS_ATOM **b) |
void | bt_sort_rw (BACKTRELLIS *bt) |
TRELLIS_ATOM * | bt_binsearch_atom (BACKTRELLIS *bt, int t, WORD_ID wkey) |
The trellis word will be stored per frame while recognition on the 1st pass. After the 1st pass ended, the word trellis will be re-formed and indexed by the frames to prepare for the access from the 2nd pass.
In the 2nd pass of reverse stack decoding, this word trellis will be used to constrain the word hypothesis, and also used to estimate the score of unseen area by the obtained backward scores in the 1st pass. Thus the word trellis information is also called as "back trellis" in Julius.
Definition in file backtrellis.c.
void bt_init | ( | BACKTRELLIS * | bt | ) |
Initialize backtrellis that will hold the whole word trellis (called once on startup).
bt | [in] pointer to the backtrellis structure to initialize |
Definition at line 74 of file backtrellis.c.
Referenced by final_fusion().
void bt_prepare | ( | BACKTRELLIS * | bt | ) |
Prepare backtrellis for the next input (called at beginning of each speech segment).
bt | [in] pointer to the word trellis structure |
Definition at line 96 of file backtrellis.c.
Referenced by get_back_trellis_init().
void bt_store | ( | BACKTRELLIS * | bt, | |
TRELLIS_ATOM * | tatom | |||
) |
Store a trellis word generated on the 1st pass for the 2nd pass.
This function just store the new atom into backtrellis. They will be re-located per frame after 1st pass for quick access in the 2nd pass.
bt | [i/o] backtrellis structure to store the trellis word | |
tatom | [in] the trellis word to be stored |
Definition at line 134 of file backtrellis.c.
Referenced by get_back_trellis_end().
void bt_relocate_rw | ( | BACKTRELLIS * | bt | ) |
Re-locate the stored atom lists per frame (will be called after the 1st pass).
bt | [i/o] word trellis structure |
Definition at line 161 of file backtrellis.c.
Referenced by finalize_1st_pass().
void bt_discount_pescore | ( | WCHMM_INFO * | wchmm, | |
BACKTRELLIS * | bt, | |||
HTK_Param * | param | |||
) |
Discount the output probabilities of the last state from the accumulated score on word edge for all trellis words survived on the 1st pass, for the acoustic re-computation on the 2nd pass. The acousitic likelihood of the word edge state will be re-computed when the next word hypotheses are expanded on the next 2nd pass.
wchmm | [in] tree lexicon | |
bt | [in] word trellis structure | |
param | [in] input parameter |
Definition at line 307 of file backtrellis.c.
Referenced by main_recognition_loop().
static int compare_wid | ( | TRELLIS_ATOM ** | a, | |
TRELLIS_ATOM ** | b | |||
) | [static] |
qsort callback for bt_sort_rw().
a | [in] first element | |
b | [in] second element |
Definition at line 356 of file backtrellis.c.
Referenced by bt_sort_rw().
void bt_sort_rw | ( | BACKTRELLIS * | bt | ) |
Sort the trellis words in the backtrellis by the word IDs per each frame, for rapid access on the 2nd pass. This should be called just after bt_relocate_rw() was called.
bt | [i/o] word trellis structure |
Definition at line 382 of file backtrellis.c.
Referenced by finalize_1st_pass().
TRELLIS_ATOM* bt_binsearch_atom | ( | BACKTRELLIS * | bt, | |
int | t, | |||
WORD_ID | wkey | |||
) |
Search a word on the specified frame in a word trellis data.
bt | [in] word trellis structure | |
t | [in] word end frame on which to search | |
wkey | [in] word ID to search |
Definition at line 420 of file backtrellis.c.
Referenced by start_word().