#include "search.h"
Go to the source code of this file.
Functions | |
void | bt_init (BACKTRELLIS *bt) |
Initialize backtrellis that will hold the whole word trellis (called once on startup). | |
void | bt_prepare (BACKTRELLIS *bt) |
Prepare backtrellis for the next input (called at beginning of each speech segment). | |
void | bt_free (BACKTRELLIS *bt) |
Free memories of backtrellis. | |
TRELLIS_ATOM * | bt_new (BACKTRELLIS *bt) |
Allocate a new trellis word atom. | |
void | bt_store (BACKTRELLIS *bt, TRELLIS_ATOM *aotm) |
Store a trellis word generated on the 1st pass for the 2nd pass. | |
void | bt_relocate_rw (BACKTRELLIS *bt) |
Re-locate the stored atom lists per frame (will be called after the 1st pass). | |
void | set_terminal_words (RecogProcess *r) |
When using progressive decoding with short pause segmentation, This function extracts the best word hypothesis on head and tail of the current input segment just after the 1st pass ends, and store them as start/end word in the following 2nd 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. | |
void | bt_discount_lm (BACKTRELLIS *bt) |
Subtract 2-gram scores at each trellis word for the 2nd pass. | |
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. | |
TRELLIS_ATOM * | bt_binsearch_atom (BACKTRELLIS *bt, int time, WORD_ID wkey) |
Search a word on the specified frame in a word trellis data. | |
void | make_iwcache_index (WCHMM_INFO *wchmm) |
void | adjust_sc_index (WCHMM_INFO *wchmm) |
Adjust factoring data in tree lexicon for multipath transition handling. | |
void | make_successor_list (WCHMM_INFO *wchmm) |
Main function to build whole successor list to lexicon tree. | |
void | max_successor_cache_init (WCHMM_INFO *wchmm) |
Initialize factoring cache for a tree lexicon, allocating memory for cache. | |
void | max_successor_cache_free (WCHMM_INFO *wchmm) |
Free all memory for factoring cache. | |
LOGPROB | max_successor_prob (WCHMM_INFO *wchmm, WORD_ID lastword, int node) |
compute factoring LM score for the given word-internal node. | |
LOGPROB * | max_successor_prob_iw (WCHMM_INFO *wchmm, WORD_ID lastword) |
Compute cross-word facgtoring values for word head nodes and return the list. | |
void | calc_all_unigram_factoring_values (WCHMM_INFO *wchmm) |
boolean | can_succeed (WCHMM_INFO *wchmm, WORD_ID lastword, int node) |
Deterministic factoring for grammar-based recognition (Julian). | |
boolean | get_back_trellis_init (HTK_Param *param, RecogProcess *r) |
Initialization of the frame synchronous beam search. | |
boolean | get_back_trellis_proceed (int t, HTK_Param *param, RecogProcess *r, boolean final_for_multipath) |
Frame synchronous beam search: proceed for 2nd frame and later. | |
void | get_back_trellis_end (HTK_Param *param, RecogProcess *r) |
Frame synchronous beam search: last frame. | |
void | fsbeam_free (FSBeam *d) |
Free work area for the first pass. | |
void | finalize_1st_pass (RecogProcess *r, int len) |
Finalize the 1st pass. | |
int | decode_proceed (Recog *recog) |
Process one input frame for all recognition process instance. | |
void | decode_end_segmented (Recog *recog) |
End procedure of the first pass (when segmented). | |
void | decode_end (Recog *recog) |
End procedure of the first pass. | |
boolean | get_back_trellis (Recog *recog) |
Frame synchronous beam search: the main (for batch mode). | |
boolean | is_sil (WORD_ID w, RecogProcess *r) |
Check if the fiven word is a short-pause word. | |
void | mfcc_copy_to_rest_and_shrink (MFCCCalc *mfcc, int start, int end) |
Split input parameter for segmentation. | |
void | mfcc_shrink (MFCCCalc *mfcc, int p) |
Shrink the parameter sequence. | |
boolean | detect_end_of_segment (RecogProcess *r, int time) |
Speech end point detection. | |
void | finalize_segment (Recog *recog) |
Finalize the first pass for successive decoding. | |
void | spsegment_init (Recog *recog) |
boolean | spsegment_trigger_sync (Recog *recog) |
boolean | spsegment_need_restart (Recog *recog, int *rf_ret, boolean *repro_ret) |
Check if rewind and restart of recognition is needed. | |
void | spsegment_restart_mfccs (Recog *recog, int rewind_frame, boolean reprocess) |
Execute rewinding. | |
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. | |
int | ngram_firstwords (NEXTWORD **nw, int peseqlen, int maxnw, RecogProcess *r) |
Get initial word hypotheses at the beginning. | |
int | ngram_nextwords (NODE *hypo, NEXTWORD **nw, int maxnw, RecogProcess *r) |
Return the list of next word candidate. | |
boolean | ngram_acceptable (NODE *hypo, RecogProcess *r) |
Acceptance check. | |
int | dfa_firstwords (NEXTWORD **nw, int peseqlen, int maxnw, RecogProcess *r) |
Return initial word set from grammar. | |
int | dfa_nextwords (NODE *hypo, NEXTWORD **nw, int maxnw, RecogProcess *r) |
Given a part-of-sentence hypothesis, returns the next word set defined by DFA grammar. | |
boolean | dfa_acceptable (NODE *hypo, RecogProcess *r) |
Return whether the hypothesis is currently on final state. | |
boolean | dfa_look_around (NEXTWORD *nword, NODE *hypo, RecogProcess *r) |
Check if the given nextword exists in the word trellis around the estimated connection time. | |
void | segment_set_last_nword (NODE *hypo, RecogProcess *r) |
Set the previous word context for the recognition of the next input segment from the current recognition result. | |
void | wchmm_fbs (HTK_Param *param, RecogProcess *r, int cate_bgn, int cate_num) |
Main function to perform stack decoding of the 2nd search pass. | |
void | clear_stocker (StackDecode *s) |
Clear the node stocker for recycle. | |
void | free_node (NODE *node) |
Stock an unused hypothesis node for recycle. | |
NODE * | cpy_node (NODE *dst, NODE *src) |
Copy the content of node to another. | |
NODE * | newnode (RecogProcess *r) |
Allocate a new hypothesis node. | |
void | malloc_wordtrellis (RecogProcess *r) |
Allocate work area for trellis computation of a word. | |
void | free_wordtrellis () |
Free the work area for trellis computation of a word. | |
void | scan_word (NODE *now, HTK_Param *param, RecogProcess *r) |
Compute the forward viterbi for the last word to update forward scores and ready for word connection. | |
void | next_word (NODE *now, NODE *new, NEXTWORD *nword, HTK_Param *param, RecogProcess *r) |
Connect a new word to generate a next hypothesis. | |
void | start_word (NODE *new, NEXTWORD *nword, HTK_Param *param, RecogProcess *r) |
Generate an initial hypothesis from given word. | |
void | last_next_word (NODE *now, NODE *new, HTK_Param *param, RecogProcess *r) |
Hypothesis termination: set the final sentence scores of hypothesis that has already reached to the end. | |
boolean | wav2mfcc (SP16 speech[], int speechlen, Recog *recog) |
Extract MFCC parameters with sentence CMN from given waveform. | |
void | j_put_header (FILE *stream) |
Output application header. | |
void | j_put_version (FILE *stream) |
Output version information. | |
void | j_put_compile_defs (FILE *stream) |
Output compile-time settings. | |
void | j_put_library_defs (FILE *stream) |
Output library configuration. | |
WCHMM_INFO * | wchmm_new () |
Allocate a new tree lexicon structure. | |
void | wchmm_free (WCHMM_INFO *w) |
Free all data in a tree lexicon. | |
void | print_wchmm_info (WCHMM_INFO *wchmm) |
Output some specifications of the tree lexicon (size etc. | |
boolean | build_wchmm (WCHMM_INFO *wchmm, JCONF_LM *lmconf) |
Build a tree lexicon from given word dictionary and language model. | |
boolean | build_wchmm2 (WCHMM_INFO *wchmm, JCONF_LM *lmconf) |
Build a tree lexicon from given word dictionary and language model. | |
void | wchmm_check_interactive (WCHMM_INFO *wchmm) |
Command loop to browse and check the structure of the constructed tree lexicon on startup. | |
void | check_wchmm (WCHMM_INFO *wchmm) |
Check coherence of tree lexicon (for internal debug only!). | |
boolean | RealTimeInit (Recog *recog) |
Initializations for the on-the-fly 1st pass decoding. | |
boolean | RealTimePipeLinePrepare (Recog *recog) |
Preparation for the on-the-fly 1st pass decoding. | |
boolean | RealTimeMFCC (MFCCCalc *mfcc, SP16 *window, int windowlen) |
Compute a parameter vector from a speech window. | |
int | RealTimePipeLine (SP16 *Speech, int len, Recog *recog) |
Main function of the on-the-fly 1st pass decoding. | |
int | RealTimeResume (Recog *recog) |
Resuming recognition for short pause segmentation. | |
boolean | RealTimeParam (Recog *recog) |
Finalize the 1st pass on-the-fly decoding. | |
void | RealTimeCMNUpdate (MFCCCalc *mfcc, Recog *recog) |
Update cepstral mean. | |
void | RealTimeTerminate (Recog *recog) |
Terminate the 1st pass on-the-fly decoding. | |
void | realbeam_free (Recog *recog) |
Free the whole work area for 1st pass on-the-fly decoding. | |
void | word_align (WORD_ID *words, short wnum, HTK_Param *param, Sentence *s, RecogProcess *r) |
Do forced alignment per word for the given word sequence. | |
void | phoneme_align (WORD_ID *words, short wnum, HTK_Param *param, Sentence *s, RecogProcess *r) |
Do forced alignment per phoneme for the given word sequence. | |
void | state_align (WORD_ID *words, short wnum, HTK_Param *param, Sentence *s, RecogProcess *r) |
Do forced alignment per HMM state for the given word sequence. | |
void | word_rev_align (WORD_ID *revwords, short wnum, HTK_Param *param, Sentence *s, RecogProcess *r) |
Do forced alignment per word for the given word sequence (reversed order). | |
void | phoneme_rev_align (WORD_ID *revwords, short wnum, HTK_Param *param, Sentence *s, RecogProcess *r) |
Do forced alignment per phoneme for the given word sequence (reversed order). | |
void | state_rev_align (WORD_ID *revwords, short wnum, HTK_Param *param, Sentence *s, RecogProcess *r) |
Do forced alignment per state for the given word sequence (reversed order). | |
void | opt_terminate () |
void | j_output_argument_help (FILE *fp) |
Output help document. | |
char * | filepath (char *filename, char *dirname) |
Change relative path to full path. | |
boolean | opt_parse (int argc, char *argv[], char *cwd, Jconf *jconf) |
Option parsing. | |
void | opt_release (Jconf *jconf) |
Free memories of variables allocated by option arguments. | |
void | get_dirname (char *path) |
Get directory name from a path name of a file. | |
boolean | config_file_parse (char *conffile, Jconf *jconf) |
Read and parse a jconf file, and set the specified option values. | |
boolean | checkpath (char *filename) |
Check if a file actually exist and is readable. | |
boolean | j_jconf_finalize (Jconf *jconf) |
Check and finalize jconf parameters. | |
int | set_beam_width (WCHMM_INFO *wchmm, int specified) |
Determine beam width on the 1st pass. | |
void | print_jconf_overview (Jconf *jconf) |
Output module overview in a global configuration variables to log. | |
void | print_engine_info (Recog *recog) |
Output all informations of an engine instance to log. | |
void | system_bootup (Recog *recog) |
boolean | adin_initialize (Recog *recog) |
Set up audio input device according to the jconf configurations. | |
boolean | adin_initialize_user (Recog *recog, void *arg) |
Initialize audio input device using user-specified A/D-in functions. | |
boolean | j_load_am (Recog *recog, JCONF_AM *amconf) |
Load an acoustic model. | |
boolean | j_load_lm (Recog *recog, JCONF_LM *lmconf) |
Load a language model. | |
boolean | j_load_all (Recog *recog, Jconf *jconf) |
Read in all models for recognition. | |
boolean | j_launch_recognition_instance (Recog *recog, JCONF_SEARCH *sconf) |
Launch a recognition process instance. | |
boolean | j_final_fusion (Recog *recog) |
Combine all loaded models and settings into one engine instance. | |
void | create_mfcc_calc_instances (Recog *recog) |
Create MFCC calculation instance for AM processing instances and GMM. | |
void | hmm_check (RecogProcess *r) |
Mode to do interactive triphone conversion check ("-check triphone"). | |
void | visual_init (Recog *recog) |
void | visual_show (BACKTRELLIS *bt) |
void | visual2_init (int maxhypo) |
void | visual2_popped (NODE *n, int popctr) |
void | visual2_next_word (NODE *next, NODE *prev, int popctr) |
void | visual2_best (NODE *now, WORD_INFO *winfo) |
boolean | gmm_init (Recog *recog) |
Initialization for computing GMM likelihoods. | |
void | gmm_prepare (Recog *recog) |
Prepare for the next GMM computation. | |
void | gmm_proceed (Recog *recog) |
Compute output probabilities of all GMM for a given input vector, and accumulate the results to the gmm_score buffer. | |
void | gmm_end (Recog *recog) |
Finish the GMM computation for an input, and output the result. | |
boolean | gmm_valid_input (Recog *recog) |
Return whether the last input was valid or invalid, from the result of GMM computation. | |
void | gmm_free (Recog *recog) |
Free work area used for GMM calculation. | |
void | wordgraph_init (WCHMM_INFO *wchmm) |
Define if you want debugging output for graph generation. | |
void | wordgraph_free (WordGraph *wg) |
Free a graph word. | |
void | put_wordgraph (FILE *fp, WordGraph *wg, WORD_INFO *winfo) |
Output information of a graph word in text in the format below: (n means the word). | |
void | wordgraph_dump (FILE *fp, WordGraph *root, WORD_INFO *winfo) |
Output text information of all the words in word graph. | |
WordGraph * | wordgraph_assign (WORD_ID wid, WORD_ID wid_left, WORD_ID wid_right, int leftframe, int rightframe, LOGPROB fscore_head, LOGPROB fscore_tail, LOGPROB gscore_head, LOGPROB gscore_tail, LOGPROB lscore, LOGPROB cmscore, RecogProcess *r) |
Return a newly allocated graph word candidates. | |
boolean | wordgraph_check_and_add_rightword (WordGraph *wg, WordGraph *right, LOGPROB lscore) |
Check for the right context if the specified graph already exists, and add it if not yet. | |
boolean | wordgraph_check_and_add_leftword (WordGraph *wg, WordGraph *left, LOGPROB lscore) |
Check for the left context if the specified graph already exists, and add it if not yet. | |
void | wordgraph_save (WordGraph *wg, WordGraph *right, WordGraph **root) |
Register a graph word candidate to the word graph as a member. | |
WordGraph * | wordgraph_check_merge (WordGraph *now, WordGraph **root, WORD_ID next_wid, boolean *merged_p, JCONF_SEARCH *jconf) |
WordGraph * | wordgraph_dup (WordGraph *wg, WordGraph **root) |
void | wordgraph_purge_leaf_nodes (WordGraph **rootp, RecogProcess *r) |
Post-processing step 1: Extract initial word graph. | |
void | wordgraph_depth_cut (WordGraph **rootp, RecogProcess *r) |
Post-processing step 1.5: word graph depth cutting. | |
void | wordgraph_adjust_boundary (WordGraph **rootp, RecogProcess *r) |
Post-processing step 2: Adjust word boundaries. | |
void | wordgraph_clean (WordGraph **rootp) |
Free all the words in a word graph. | |
void | wordgraph_compaction_thesame (WordGraph **rootp) |
Post-processing step 3: Bundle words (exactly the same ones). | |
void | wordgraph_compaction_exacttime (WordGraph **rootp, RecogProcess *r) |
Post-processing step 4: Bundle words (same boundaries). | |
void | wordgraph_compaction_neighbor (WordGraph **rootp, RecogProcess *r) |
Post-processing step 5: Bundle words (neighbor words). | |
int | wordgraph_sort_and_annotate_id (WordGraph **rootp, RecogProcess *r) |
Sort words by left time and annotate sequencial id for them in a word graph. | |
void | wordgraph_check_coherence (WordGraph *rootp, RecogProcess *r) |
For debug: Check the coherence in word graph. | |
void | graph_forward_backward (WordGraph *root, RecogProcess *r) |
Compute graph-based confidence scores by forward-backward parsing on the generated lattice. | |
void | jconf_set_default_values (Jconf *j) |
Fill in the system default values to a parameter structure Jconf. | |
void | jconf_set_default_values_am (JCONF_AM *j) |
Fill in system default values to an AM parameter structure. | |
void | jconf_set_default_values_lm (JCONF_LM *j) |
Fill in system default values to an LM parameter structure. | |
void | jconf_set_default_values_search (JCONF_SEARCH *j) |
Fill in system default values to a search parameter structure. | |
void | multigram_add (DFA_INFO *dfa, WORD_INFO *winfo, char *name, PROCESS_LM *lm) |
Add a new grammar to the current list of grammars. | |
boolean | multigram_delete (int gid, PROCESS_LM *lm) |
Mark a grammar in the grammar list to be deleted at the next grammar update. | |
void | multigram_delete_all (PROCESS_LM *lm) |
Mark all grammars to be deleted at next grammar update. | |
boolean | multigram_update (PROCESS_LM *lm) |
Update global grammar if needed. | |
boolean | multigram_build (RecogProcess *r) |
Check for global grammar and (re-)build tree lexicon if needed. | |
int | multigram_activate (int gid, PROCESS_LM *lm) |
Activate a grammar in the grammar list. | |
int | multigram_deactivate (int gid, PROCESS_LM *lm) |
Deactivate a grammar in the grammar list. | |
boolean | multigram_load_all_gramlist (PROCESS_LM *lm) |
Load all the grammars specified at startup. | |
int | multigram_get_gram_from_category (int category, PROCESS_LM *lm) |
Get which grammar the given category belongs to. | |
int | multigram_get_all_num (PROCESS_LM *lm) |
Get the number of current grammars (both active and inactive). | |
void | multigram_free_all (MULTIGRAM *root) |
Free all grammars. | |
MULTIGRAM * | multigram_get_grammar_by_name (PROCESS_LM *lm, char *gramname) |
Find a grammar in LM by its name. | |
MULTIGRAM * | multigram_get_grammar_by_id (PROCESS_LM *lm, unsigned short id) |
Find a grammar in LM by its ID number. | |
boolean | multigram_add_words_to_grammar (PROCESS_LM *lm, MULTIGRAM *m, WORD_INFO *winfo) |
Append words to a grammar. | |
boolean | multigram_add_words_to_grammar_by_name (PROCESS_LM *lm, char *gramname, WORD_INFO *winfo) |
Append words to a grammar, given by its name. | |
boolean | multigram_add_words_to_grammar_by_id (PROCESS_LM *lm, unsigned short id, WORD_INFO *winfo) |
Append words to a grammar, given by its ID number. | |
void | multigram_add_gramlist (char *dfafile, char *dictfile, JCONF_LM *j, int lmvar) |
Add a grammar to the grammar list to be read at startup. | |
void | multigram_remove_gramlist (JCONF_LM *j) |
Remove the grammar list to be read at startup. | |
boolean | multigram_add_prefix_list (char *prefix_list, char *cwd, JCONF_LM *j, int lmvar) |
Add multiple grammars given by their prefixs to the grammar list. | |
boolean | multigram_add_prefix_filelist (char *listfile, JCONF_LM *j, int lmvar) |
Add multiple grammars from prefix list file to the grammar list. | |
void | adin_setup_param (ADIn *adin, Jconf *jconf) |
Set up parameters for A/D-in and input detection. | |
boolean | adin_thread_create (Recog *recog) |
Start new A/D-in thread, and initialize buffer. | |
int | adin_go (int(*ad_process)(SP16 *, int, Recog *), int(*ad_check)(Recog *), Recog *recog) |
Top function to start input processing. | |
boolean | adin_standby (ADIn *a, int freq, void *arg) |
Call device-specific initialization. | |
boolean | adin_begin (ADIn *a) |
Call device-specific function to begin capturing of the audio stream. | |
boolean | adin_end (ADIn *a) |
Call device-specific function to end capturing of the audio stream. | |
void | adin_free_param (Recog *recog) |
Free memories of A/D-in work area. | |
CN_CLUSTER * | confnet_create (WordGraph *root, RecogProcess *r) |
Create a confusion network from word graph. | |
void | graph_make_order (WordGraph *root, RecogProcess *r) |
Extract order relationship between any two words in the word graph for confusion network generation. | |
void | graph_free_order () |
Free the order relation data. | |
void | cn_free_all (CN_CLUSTER **croot) |
Free all cluster holders. | |
void | callback_init (Recog *recog) |
Initialize callback management area. | |
int | callback_add (Recog *recog, int code, void(*func)(Recog *recog, void *data), void *data) |
Register a function to a callback registory. | |
int | callback_add_adin (Recog *recog, int code, void(*func)(Recog *recog, SP16 *buf, int len, void *data), void *data) |
Register a function to the A/D-in type callback registory. | |
void | callback_exec (int code, Recog *recog) |
Execute all functions assigned to a callback registory. | |
void | callback_exec_adin (int code, Recog *recog, SP16 *buf, int len) |
Execute all functions assigned to a A/D-in callback. | |
boolean | callback_exist (Recog *recog, int code) |
Check if at least one function has been registered to a callback repository. | |
boolean | callback_delete (Recog *recog, int id) |
Delete an already registered function from callback. | |
void | result_sentence_malloc (RecogProcess *r, int num) |
Allocate storage of recognition results. | |
void | result_sentence_free (RecogProcess *r) |
Free storage of recognition results. | |
void | clear_result (RecogProcess *r) |
Clear all result storages for next input. |
Definition in file extern.h.
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 79 of file backtrellis.c.
Referenced by j_launch_recognition_instance().
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 104 of file backtrellis.c.
void bt_free | ( | BACKTRELLIS * | bt | ) |
Free memories of backtrellis.
bt | [out] pointer to the word trellis structure. |
Definition at line 131 of file backtrellis.c.
Referenced by j_recogprocess_free().
TRELLIS_ATOM* bt_new | ( | BACKTRELLIS * | bt | ) |
Allocate a new trellis word atom.
bt | [out] pointer to the word trellis structure. |
Definition at line 154 of file backtrellis.c.
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 190 of file backtrellis.c.
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 218 of file backtrellis.c.
void set_terminal_words | ( | RecogProcess * | r | ) |
When using progressive decoding with short pause segmentation, This function extracts the best word hypothesis on head and tail of the current input segment just after the 1st pass ends, and store them as start/end word in the following 2nd pass.
r | [in] recognition process instance |
Definition at line 295 of file backtrellis.c.
Referenced by finalize_segment().
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 367 of file backtrellis.c.
void bt_discount_lm | ( | BACKTRELLIS * | bt | ) |
Subtract 2-gram scores at each trellis word for the 2nd pass.
bt | [in] word trellis |
Definition at line 401 of file backtrellis.c.
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 468 of file backtrellis.c.
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 509 of file backtrellis.c.
Referenced by next_word(), and start_word().
void adjust_sc_index | ( | WCHMM_INFO * | wchmm | ) |
Adjust factoring data in tree lexicon for multipath transition handling.
wchmm | [in] tree lexicon |
Definition at line 480 of file factoring_sub.c.
void make_successor_list | ( | WCHMM_INFO * | wchmm | ) |
Main function to build whole successor list to lexicon tree.
wchmm | [i/o] tree lexicon |
Definition at line 370 of file factoring_sub.c.
void max_successor_cache_init | ( | WCHMM_INFO * | wchmm | ) |
Initialize factoring cache for a tree lexicon, allocating memory for cache.
This should be called only once on start up.
wchmm | [i/o] tree lexicon |
Definition at line 574 of file factoring_sub.c.
Referenced by j_launch_recognition_instance().
void max_successor_cache_free | ( | WCHMM_INFO * | wchmm | ) |
Free all memory for factoring cache.
wchmm | [i/o] tree lexicon |
Definition at line 656 of file factoring_sub.c.
LOGPROB max_successor_prob | ( | WCHMM_INFO * | wchmm, | |
WORD_ID | lastword, | |||
int | node | |||
) |
compute factoring LM score for the given word-internal node.
If it is a shared branch node and 1-gram factoring is used, the constant factoring value which has already been assigned before search will be returned immediately. Else, the maximum 2-gram probability of corresponding successor words are computed.
The word-internal factoring cache is consulted within this function. If the given last word is the same as the last call on that node, the last computed value will be returned, else the maximum value will be computed update the cache with the last word and value.
wchmm | [in] tree lexicon | |
lastword | [in] word ID of last context word | |
node | [in] node ID |
Definition at line 923 of file factoring_sub.c.
LOGPROB* max_successor_prob_iw | ( | WCHMM_INFO * | wchmm, | |
WORD_ID | lastword | |||
) |
Compute cross-word facgtoring values for word head nodes and return the list.
Given a last word, this function compute the factoring LM scores for all the word head node to which the context-dependent (not 1-gram) factoring values should be computed. The resulting list of factoring values are cached within this function per the last word.
wchmm | [in] tree lexicon | |
lastword | [in] last word |
Definition at line 1030 of file factoring_sub.c.
boolean can_succeed | ( | WCHMM_INFO * | wchmm, | |
WORD_ID | lastword, | |||
int | node | |||
) |
Deterministic factoring for grammar-based recognition (Julian).
If CATEGORY_TREE is defined (this is default) on Julian, the tree lexicon will be organized per category and the category-pair constraint used in the 1st pass can be applied statically at cross-word transition.
If the CATEGORY_TREE is not defined, a single tree lexicon will be constucted for a whole dictionary. In this case, the category-pair constraint should be applied dynamically in the word-internal transition, like the factoring scheme with N-gram (Julius).
This function provides such word-internal factoring for grammar-based recognition (called deterministic factoring) when CATEGORY_TREE is undefined in Julian.
wchmm | [in] tree lexicon | |
lastword | [in] last word | |
node | [in] node ID to check the constraint |
Definition at line 1176 of file factoring_sub.c.
boolean get_back_trellis_init | ( | HTK_Param * | param, | |
RecogProcess * | r | |||
) |
Initialization of the frame synchronous beam search.
This function will initialize work area for the 1st pass. Generation of initial hypotheses will be performed in init_nodescore().
param | [in] input vectors (only the first frame will be used) | |
r | [i/o] recognition process instance |
Definition at line 1763 of file beam.c.
Referenced by decode_proceed().
boolean get_back_trellis_proceed | ( | int | t, | |
HTK_Param * | param, | |||
RecogProcess * | r, | |||
boolean | final_for_multipath | |||
) |
Frame synchronous beam search: proceed for 2nd frame and later.
This is the main function of beam search on the 1st pass. Given a input vector of a frame, it proceeds the computation for the one frame, and store the words survived in the beam width to the word trellis structure. get_back_trellis_init() should be used for the first frame. For detailed procedure, please see the comments in this function.
t | [in] current frame to be computed in param | |
param | [in] input vector structure (only the vector at t will be used) | |
r | [in] recognition process instance | |
final_for_multipath | [i/o] TRUE if this is last frame of an input |
< Local workarea to hold the generated trellis word
< Temporal work to hold the current node number on the lexicon tree
Definition at line 2558 of file beam.c.
Referenced by decode_proceed().
void get_back_trellis_end | ( | HTK_Param * | param, | |
RecogProcess * | r | |||
) |
Frame synchronous beam search: last frame.
This function should be called at the end of the 1st pass. The last procedure will be done for the (param->samplenum - 1) frame.
param | [in] input vectors (only param->samplenum is referred) | |
r | [in] recognition process instance |
Definition at line 2905 of file beam.c.
Referenced by decode_end().
void fsbeam_free | ( | FSBeam * | d | ) |
Free work area for the first pass.
d | [in] work are for 1st pass input handling |
Definition at line 3029 of file beam.c.
Referenced by j_recogprocess_free().
void finalize_1st_pass | ( | RecogProcess * | r, | |
int | len | |||
) |
Finalize the 1st pass.
This function will be called just after get_back_trellis_end() to finalize the 1st pass. It processes the resulting word trellis structure to be accessible from the 2nd pass, and output the best sentence hypothesis by backtracing the word trellis.
r | [in] recoginirion process instance | |
len | [in] total number of processed frames |
Definition at line 2983 of file beam.c.
Referenced by decode_end(), and decode_end_segmented().
int decode_proceed | ( | Recog * | recog | ) |
Process one input frame for all recognition process instance.
This function proceeds the recognition for one frame. All recognition process instance will be processed synchronously. The input frame for each instance is stored in mfcc->f, where mfcc is the MFCC calculation instance assigned to each process instance.
If an instance's mfcc->invalid is set to TRUE, its processing will be skipped.
When using GMM, GMM computation will also be executed here. If GMM_VAD is defined, GMM-based voice detection will be performed inside this function, by using a scheme of short-pause segmentation.
This function also handles segmentation of recognition process. A segmentation will occur when end of speech is detected by level-based sound detection or GMM-based / decoder-based VAD, or by request from application. When segmented, it stores current frame and return with that status.
The frame-wise callbacks will be executed inside this function, when at least one valid recognition process instances exists.
recog | [in] engine instance |
Definition at line 112 of file pass1.c.
Referenced by get_back_trellis(), RealTimeParam(), RealTimePipeLine(), and RealTimeResume().
void decode_end_segmented | ( | Recog * | recog | ) |
End procedure of the first pass (when segmented).
This function do things for ending the first pass and prepare for the next recognition, when the input was segmented at the middle of recognition by some reason.
First, the best path at each recognition process instance will be parsed and stored. In case of recognition error or input rejection, the error status will be set.
Then, the last pause segment of the processed input will be cut and saved to be processed at first in the recognition of the next or remaining input.
recog | [in] engine instance |
Definition at line 363 of file pass1.c.
Referenced by get_back_trellis(), and RealTimeParam().
void decode_end | ( | Recog * | recog | ) |
End procedure of the first pass.
This function finish the first pass, when the input was fully processed to the end.
The best path at each recognition process instance will be parsed and stored. In case of recognition error or input rejection, the error status will be set.
recog | [in] engine instance |
Definition at line 440 of file pass1.c.
Referenced by get_back_trellis(), RealTimeParam(), and RealTimeTerminate().
boolean get_back_trellis | ( | Recog * | recog | ) |
Frame synchronous beam search: the main (for batch mode).
This function perform the 1st recognition pass of frame-synchronous beam search and output the result. It also stores all the word ends in every input frame to word trellis structure.
This function will be called if the whole input vector is already given to the end. When online recognition, where the 1st pass will be processed in parallel with input, this function will not be used. In that case, functions defined in this file will be directly called from functions in realtime-1stpass.c.
recog | [in] engine instance |
boolean is_sil | ( | WORD_ID | w, | |
RecogProcess * | r | |||
) |
Check if the fiven word is a short-pause word.
w | [in] word id | |
r | [in] recognition process instance |
Definition at line 98 of file spsegment.c.
Referenced by detect_end_of_segment().
void mfcc_copy_to_rest_and_shrink | ( | MFCCCalc * | mfcc, | |
int | start, | |||
int | end | |||
) |
Split input parameter for segmentation.
Copy the rest samples in param to rest_param, and shrink the param in mfcc instance. [start...param->samplenum] will be copied to rest_param, and [0...end] will be left in param.
mfcc | [i/o] MFCC calculation instance | |
start | [in] copy start frame | |
end | [in] original end frame |
Definition at line 154 of file spsegment.c.
Referenced by finalize_segment().
void mfcc_shrink | ( | MFCCCalc * | mfcc, | |
int | p | |||
) |
Shrink the parameter sequence.
Drop the first (p-1) frames and move [p..samplenum] to 0.
mfcc | [i/o] MFCC Calculation instance | |
p | [in] frame point to remain |
Definition at line 194 of file spsegment.c.
boolean detect_end_of_segment | ( | RecogProcess * | r, | |
int | time | |||
) |
Speech end point detection.
Detect end-of-input by duration of short-pause words when short-pause segmentation is enabled. When a pause word gets maximum score for a successive frames, the segment will be treated as a pause frames. When speech re-triggers, the current input will be segmented at that point.
When SPSEGMENT_NAIST is defined, this function performs extended version of the short pause segmentation, called "decoder-based VAD". When before speech trigger (r->pass1.after_trigger == FALSE), it tells the recognition functions not to generate word trellis and continue calculation. If a speech trigger is found (not a pause word gets maximum score), the input frames are 'rewinded' for a certain frame (r->config->successive.sp_margin) and start the normal recognition process from the rewinded frames (r->pass1.after_trigger = TRUE). When a pause frame duration reaches a limit (r->config->successive.sp_frame_duration), it terminate the search.
r | [i/o] recognition process instance | |
time | [in] current input frame |
Definition at line 262 of file spsegment.c.
Referenced by decode_proceed().
void finalize_segment | ( | Recog * | recog | ) |
Finalize the first pass for successive decoding.
When successive decoding mode is enabled, this function will be called just after finalize_1st_pass() to finish the beam search of the last segment. The beginning and ending words for the 2nd pass will be set according to the 1st pass result. Then the current input will be shrinked to the segmented length and the unprocessed region are copied to rest_param for the next decoding.
recog | [in] engine instance |
Definition at line 632 of file spsegment.c.
Referenced by decode_end(), and decode_end_segmented().
boolean spsegment_need_restart | ( | Recog * | recog, | |
int * | rf_ret, | |||
boolean * | repro_ret | |||
) |
Check if rewind and restart of recognition is needed.
This function checks if an instance requires rewinding of input samples, and if recognition re-processing is needed after rewinding.
recog | [in] engine instance | |
rf_ret | [out] length of frame to rewind | |
repro_ret | [out] TRUE if re-process is required after rewinding |
Definition at line 836 of file spsegment.c.
Referenced by get_back_trellis(), and RealTimePipeLine().
void spsegment_restart_mfccs | ( | Recog * | recog, | |
int | rewind_frame, | |||
boolean | reprocess | |||
) |
Execute rewinding.
This function will set re-start point for the following processing, and shrink the parameters for the rewinded part. The re-start point is 0 (beginning of rest samples) for recognition restart, or simply go back to the specified rewind frames for non restart.
recog | [i/o] engine instance | |
rewind_frame | [in] frame length to rewind | |
reprocess | [in] TRUE if re-processing recognition is required for the following processing |
Definition at line 907 of file spsegment.c.
Referenced by get_back_trellis(), and RealTimePipeLine().
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.
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 |
< Local workarea for HMM name conversion
Definition at line 351 of file outprob_style.c.
Referenced by bt_discount_pescore().
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.
base | [in] base triphone | |
rc_name | [in] name of right context phone |
< Local workarea for HMM name conversion
Definition at line 516 of file outprob_style.c.
Referenced by next_word(), and scan_word().
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.
base | [in] base triphone | |
lc_name | [in] name of left context phone |
< Local workarea for HMM name conversion
Definition at line 548 of file outprob_style.c.
Referenced by scan_word().
int ngram_firstwords | ( | NEXTWORD ** | nw, | |
int | peseqlen, | |||
int | maxnw, | |||
RecogProcess * | r | |||
) |
Get initial word hypotheses at the beginning.
on N-gram based recogntion, the initial hypothesis is fixed to the tail silence word. Exception is that, in short-pause segmentation mode, the initial hypothesis will be chosen from survived words on the last input frame in the first pass.
nw | [out] pointer to hold the initial word candidates | |
peseqlen | [in] input frame length | |
maxnw | [in] maximum number of words that can be stored in nw | |
r | [in] recognition process instance |
Definition at line 495 of file ngram_decode.c.
int ngram_nextwords | ( | NODE * | hypo, | |
NEXTWORD ** | nw, | |||
int | maxnw, | |||
RecogProcess * | r | |||
) |
Return the list of next word candidate.
Given a partial sentence hypothesis "hypo", it returns the list of next word candidates. Actually, it extracts from word trellis the list of words whose word-end node has survived near the estimated beginning-of-word frame of last word "hypo->estimated_next_t", and store them to "nw" with their N-gram probabilities.
hypo | [in] source partial sentence hypothesis | |
nw | [out] pointer to store the list of next word candidates (should be already allocated) | |
maxnw | [in] maximum number of words that can be stored to nw | |
r | [in] recognition process instance |
Definition at line 562 of file ngram_decode.c.
boolean ngram_acceptable | ( | NODE * | hypo, | |
RecogProcess * | r | |||
) |
Acceptance check.
Return whether the given partial hypothesis is acceptable as a sentence and can be treated as a final search candidate. In N-gram mode, it checks whether the last word is the beginning-of-sentence silence (silhead).
hypo | [in] partial sentence hypothesis to be examined | |
r | [in] recognition process instance |
Definition at line 612 of file ngram_decode.c.
int dfa_firstwords | ( | NEXTWORD ** | nw, | |
int | peseqlen, | |||
int | maxnw, | |||
RecogProcess * | r | |||
) |
Return initial word set from grammar.
nw | [out] pointer to hold the resulting next word set | |
peseqlen | [in] input frame length | |
maxnw | [in] maximum number of words that can be set in nw | |
r | [in] recognition process instance |
Definition at line 89 of file dfa_decode.c.
int dfa_nextwords | ( | NODE * | hypo, | |
NEXTWORD ** | nw, | |||
int | maxnw, | |||
RecogProcess * | r | |||
) |
Given a part-of-sentence hypothesis, returns the next word set defined by DFA grammar.
hypo | [in] the source part-of-sentene hypothesis | |
nw | [out] pointer to hold the resulting next word set | |
maxnw | [in] maximum number of words that can be set in nw | |
r | [in] recognition process instance |
Definition at line 155 of file dfa_decode.c.
boolean dfa_acceptable | ( | NODE * | hypo, | |
RecogProcess * | r | |||
) |
Return whether the hypothesis is currently on final state.
hypo | [in] sentence hypothesis | |
r | [in] recognition process instance |
Definition at line 222 of file dfa_decode.c.
boolean dfa_look_around | ( | NEXTWORD * | nword, | |
NODE * | hypo, | |||
RecogProcess * | r | |||
) |
Check if the given nextword exists in the word trellis around the estimated connection time.
If exist, set the pointer to the corresponding trellis word to the nextword. Since the best connection time will be re-computed later, it need not to be an optimal one.
nword | [i/o] next word candidate (pointer to the found trellis word will be set) | |
hypo | [in] source part-of-sentence hypothesis | |
r | [in] recognition process instance |
Definition at line 267 of file dfa_decode.c.
void segment_set_last_nword | ( | NODE * | hypo, | |
RecogProcess * | r | |||
) |
Set the previous word context for the recognition of the next input segment from the current recognition result.
The initial context word will be chosen from the current recognition result skipping transparent word and multiplied words.
hypo | [in] sentence candidate as a recognition result of current input segment | |
r | [in] recognition process instance |
Definition at line 882 of file search_bestfirst_main.c.
void wchmm_fbs | ( | HTK_Param * | param, | |
RecogProcess * | r, | |||
int | cate_bgn, | |||
int | cate_num | |||
) |
Main function to perform stack decoding of the 2nd search pass.
The cate_bgn and cate_num (third and fourth argument) will have no effect when N-gram is used.
param | [in] input parameter vector | |
r | [i/o] recognition process instance | |
cate_bgn | [in] category id to allow word expansion from (ignored in Julius) | |
cate_num | [in] num of category to allow word expansion from (ignored in Julius) |
Definition at line 1126 of file search_bestfirst_main.c.
void clear_stocker | ( | StackDecode * | s | ) |
Clear the node stocker for recycle.
s | [in] stack decoding work area |
Definition at line 206 of file search_bestfirst_v1.c.
void free_node | ( | NODE * | node | ) |
Stock an unused hypothesis node for recycle.
node | [in] hypothesis node |
Definition at line 170 of file search_bestfirst_v1.c.
Referenced by free_all_nodes(), put_all_in_stack(), and put_to_stack().
Copy the content of node to another.
dst | [out] target hypothesis | |
src | [in] source hypothesis |
Definition at line 247 of file search_bestfirst_v1.c.
Referenced by last_next_word().
NODE* newnode | ( | RecogProcess * | r | ) |
Allocate a new hypothesis node.
If the node stocker is not empty, the one in the stocker is re-used. Otherwise, allocate as new.
r | [in] recognition process instance |
Definition at line 324 of file search_bestfirst_v1.c.
void malloc_wordtrellis | ( | RecogProcess * | r | ) |
Allocate work area for trellis computation of a word.
r | [in] recognition process instance |
Definition at line 440 of file search_bestfirst_v1.c.
void scan_word | ( | NODE * | now, | |
HTK_Param * | param, | |||
RecogProcess * | r | |||
) |
Compute the forward viterbi for the last word to update forward scores and ready for word connection.
now | [i/o] hypothesis | |
param | [in] input parameter vectors | |
r | [in] recognition process instance |
Definition at line 595 of file search_bestfirst_v1.c.
void next_word | ( | NODE * | now, | |
NODE * | new, | |||
NEXTWORD * | nword, | |||
HTK_Param * | param, | |||
RecogProcess * | r | |||
) |
Connect a new word to generate a next hypothesis.
The optimal connection point and new sentence score of the new hypothesis will be estimated by looking up the corresponding words on word trellis.
now | [in] source hypothesis | |
new | [out] pointer to save the newly generated hypothesis | |
nword | [in] next word to be connected | |
param | [in] input parameter vector | |
r | [in] recognition process instance |
Definition at line 1393 of file search_bestfirst_v1.c.
void start_word | ( | NODE * | new, | |
NEXTWORD * | nword, | |||
HTK_Param * | param, | |||
RecogProcess * | r | |||
) |
Generate an initial hypothesis from given word.
new | [out] pointer to save the newly generated hypothesis | |
nword | [in] words of the first candidates | |
param | [in] input parameter vector | |
r | [in] recognition process instance |
Definition at line 1625 of file search_bestfirst_v1.c.
void last_next_word | ( | NODE * | now, | |
NODE * | new, | |||
HTK_Param * | param, | |||
RecogProcess * | r | |||
) |
Hypothesis termination: set the final sentence scores of hypothesis that has already reached to the end.
now | [in] hypothesis that has already reached to the end | |
new | [out] pointer to save the final sentence information | |
param | [in] input parameter vectors | |
r | [in] recognition process instance |
Definition at line 1719 of file search_bestfirst_v1.c.
Extract MFCC parameters with sentence CMN from given waveform.
Parameters will be computed for each MFCC calculation instance in the engine instance, and stored in mfcc->param for each.
speech | [in] buffer of speech waveform | |
speechlen | [in] length of speech in samples | |
recog | [in] engine instance |
Definition at line 85 of file wav2mfcc.c.
void j_put_header | ( | FILE * | strm | ) |
Output application header.
strm | [in] output stream |
Definition at line 47 of file version.c.
Referenced by j_output_argument_help(), opt_parse(), and print_engine_info().
void j_put_version | ( | FILE * | strm | ) |
void j_put_compile_defs | ( | FILE * | strm | ) |
Output compile-time settings.
strm | [in] input stream |
Definition at line 88 of file version.c.
Referenced by j_output_argument_help(), opt_parse(), and print_engine_info().
void j_put_library_defs | ( | FILE * | strm | ) |
Output library configuration.
strm | [in] output stream |
Definition at line 250 of file version.c.
Referenced by opt_parse().
WCHMM_INFO* wchmm_new | ( | ) |
Allocate a new tree lexicon structure.
Definition at line 70 of file wchmm.c.
Referenced by j_launch_recognition_instance(), and multigram_rebuild_wchmm().
void wchmm_free | ( | WCHMM_INFO * | w | ) |
Free all data in a tree lexicon.
w | [in] tree lexicon |
Definition at line 212 of file wchmm.c.
Referenced by j_recogprocess_free(), and multigram_rebuild_wchmm().
void print_wchmm_info | ( | WCHMM_INFO * | wchmm | ) |
Output some specifications of the tree lexicon (size etc.
) to stdout.
wchmm | [in] tree lexicon already built |
Definition at line 2083 of file wchmm.c.
Referenced by print_engine_info().
boolean build_wchmm | ( | WCHMM_INFO * | wchmm, | |
JCONF_LM * | lmconf | |||
) |
Build a tree lexicon from given word dictionary and language model.
This function is slow and only used when "-oldtree" option is specified in Julian. Julian without that option and Julius uses build_wchmm2() instead of this.
wchmm | [i/o] lexicon tree | |
lmconf | [in] language model (LM) configuration parameters |
Definition at line 1551 of file wchmm.c.
Referenced by j_launch_recognition_instance(), and multigram_rebuild_wchmm().
boolean build_wchmm2 | ( | WCHMM_INFO * | wchmm, | |
JCONF_LM * | lmconf | |||
) |
Build a tree lexicon from given word dictionary and language model.
This function does the same job as build_wchmm(), but it is much faster because finding of the longest matched word to an adding word is done by first sorting all the words in the dictoinary by their phoneme sequence order. This function will be used instead of build_wchmm() by default.
wchmm | [i/o] lexicon tree | |
lmconf | [in] language model (LM) configuration parameters |
Definition at line 1756 of file wchmm.c.
Referenced by j_launch_recognition_instance(), and multigram_rebuild_wchmm().
void wchmm_check_interactive | ( | WCHMM_INFO * | wchmm | ) |
Command loop to browse and check the structure of the constructed tree lexicon on startup.
wchmm | [in] tree lexicon |
Definition at line 328 of file wchmm_check.c.
Referenced by check_wchmm(), j_launch_recognition_instance(), and multigram_rebuild_wchmm().
void check_wchmm | ( | WCHMM_INFO * | wchmm | ) |
Check coherence of tree lexicon (for internal debug only!).
wchmm | [in] tree lexicon |
Definition at line 443 of file wchmm_check.c.
boolean RealTimeInit | ( | Recog * | recog | ) |
Initializations for the on-the-fly 1st pass decoding.
Work areas for all MFCC caculation instances are allocated. Additionaly, some initialization will be done such as allocating work area for spectral subtraction, loading noise spectrum from file, loading initial ceptral mean data for CMN from file, etc.
This will be called only once, on system startup.
recog | [i/o] engine instance |
Definition at line 222 of file realtime-1stpass.c.
Referenced by j_final_fusion().
boolean RealTimePipeLinePrepare | ( | Recog * | recog | ) |
Preparation for the on-the-fly 1st pass decoding.
Variables are reset and data are prepared for the next input recognition.
This function will be called before starting each input (segment).
recog | [i/o] engine instance |
Definition at line 379 of file realtime-1stpass.c.
Compute a parameter vector from a speech window.
This function calculates an MFCC vector from speech data windowed from input speech. The obtained MFCC vector will be stored to mfcc->tmpmfcc.
mfcc | [i/o] MFCC calculation instance | |
window | [in] speech input (windowed from input stream) | |
windowlen | [in] length of window |
Definition at line 463 of file realtime-1stpass.c.
Referenced by j_recog_new().
Main function of the on-the-fly 1st pass decoding.
This function performs sucessive MFCC calculation and 1st pass decoding. The given input data are windowed to a certain length, then converted to MFCC, and decoding for the input frame will be performed in one process cycle. The loop cycle will continue with window shift, until the whole given input has been processed.
In case of input segment request from decoding process (in decode_proceed()), this function keeps the rest un-processed speech to a buffer and tell the caller to stop input and end the 1st pass.
When back-end VAD such as SPSEGMENT_NAIST or GMM_VAD is defined, Decoder-based VAD is enabled and its decoding control will be managed here. In decoder-based VAD mode, the recognition will be processed but no output will be done at the first un-triggering input area. when speech input start is detected, this function will rewind the already obtained MFCC sequence to a certain frames, and re-start normal recognition at that point. When multiple recognition process instance is running, their segmentation will be synchronized.
This function will be called each time a new speech sample comes as as callback from A/D-in routine.
Speech | [in] pointer to the speech sample segments | |
nowlen | [in] length of above | |
recog | [i/o] engine instance |
Definition at line 635 of file realtime-1stpass.c.
Referenced by RealTimeResume().
int RealTimeResume | ( | Recog * | recog | ) |
Resuming recognition for short pause segmentation.
This function process overlapped data and remaining speech prior to the next input when input was segmented at last processing.
recog | [i/o] engine instance |
Definition at line 904 of file realtime-1stpass.c.
boolean RealTimeParam | ( | Recog * | recog | ) |
Finalize the 1st pass on-the-fly decoding.
This function will be called after the 1st pass processing ends. It fix the input length of parameter vector sequence, call decode_end() (or decode_end_segmented() when last input was ended by segmentation) to finalize the 1st pass.
If the last input was ended by end-of-stream (in case input reached EOF in file input etc.), process the rest samples remaining in the delta buffers.
recog | [i/o] engine instance |
Definition at line 1059 of file realtime-1stpass.c.
Update cepstral mean.
This function updates the initial cepstral mean for CMN of the next input.
mfcc | [i/o] MFCC Calculation instance to update its CMN | |
recog | [i/o] engine instance |
Definition at line 1296 of file realtime-1stpass.c.
void RealTimeTerminate | ( | Recog * | recog | ) |
Terminate the 1st pass on-the-fly decoding.
recog | [i/o] engine instance |
Definition at line 1357 of file realtime-1stpass.c.
void realbeam_free | ( | Recog * | recog | ) |
Free the whole work area for 1st pass on-the-fly decoding.
recog | [in] engine instance |
Definition at line 1382 of file realtime-1stpass.c.
Referenced by j_recog_free().
void word_align | ( | WORD_ID * | words, | |
short | wnum, | |||
HTK_Param * | param, | |||
Sentence * | s, | |||
RecogProcess * | r | |||
) |
Do forced alignment per word for the given word sequence.
words | [in] word sequence | |
wnum | [in] length of words | |
param | [in] input parameter vectors | |
s | [out] Sentence data area to store the alignment result | |
r | [i/o] recognition process instance |
Definition at line 370 of file word_align.c.
void phoneme_align | ( | WORD_ID * | words, | |
short | num, | |||
HTK_Param * | param, | |||
Sentence * | s, | |||
RecogProcess * | r | |||
) |
Do forced alignment per phoneme for the given word sequence.
words | [in] word sequence | |
num | [in] length of words | |
param | [in] input parameter vectors | |
s | [out] Sentence data area to store the alignment result | |
r | [i/o] recognition process instance |
Definition at line 431 of file word_align.c.
void state_align | ( | WORD_ID * | words, | |
short | num, | |||
HTK_Param * | param, | |||
Sentence * | s, | |||
RecogProcess * | r | |||
) |
Do forced alignment per HMM state for the given word sequence.
words | [in] word sequence | |
num | [in] length of words | |
param | [in] input parameter vectors | |
s | [out] Sentence data area to store the alignment result | |
r | [i/o] recognition process instance |
Definition at line 492 of file word_align.c.
void word_rev_align | ( | WORD_ID * | revwords, | |
short | wnum, | |||
HTK_Param * | param, | |||
Sentence * | s, | |||
RecogProcess * | r | |||
) |
Do forced alignment per word for the given word sequence (reversed order).
revwords | [in] word sequence in reversed direction | |
wnum | [in] length of revwords | |
param | [in] input parameter vectors | |
s | [out] Sentence data area to store the alignment result | |
r | [i/o] recognition process instance |
Definition at line 398 of file word_align.c.
void phoneme_rev_align | ( | WORD_ID * | revwords, | |
short | num, | |||
HTK_Param * | param, | |||
Sentence * | s, | |||
RecogProcess * | r | |||
) |
Do forced alignment per phoneme for the given word sequence (reversed order).
revwords | [in] word sequence in reversed direction | |
num | [in] length of revwords | |
param | [in] input parameter vectors | |
s | [out] Sentence data area to store the alignment result | |
r | [i/o] recognition process instance |
Definition at line 459 of file word_align.c.
void state_rev_align | ( | WORD_ID * | revwords, | |
short | num, | |||
HTK_Param * | param, | |||
Sentence * | s, | |||
RecogProcess * | r | |||
) |
Do forced alignment per state for the given word sequence (reversed order).
revwords | [in] word sequence in reversed direction | |
num | [in] length of revwords | |
param | [in] input parameter vectors | |
s | [out] Sentence data area to store the alignment result | |
r | [i/o] recognition process instance |
Definition at line 520 of file word_align.c.
char* filepath | ( | char * | filename, | |
char * | dirname | |||
) |
Change relative path to full path.
If the file path is given as relative, prepend the dirname to it. If the file path is full, just copy it to new buffer and return.
filename | [in] file path name | |
dirname | [in] full path of current directory |
Definition at line 58 of file m_options.c.
Referenced by multigram_add_prefix_filelist(), multigram_add_prefix_list(), and opt_parse().
boolean opt_parse | ( | int | argc, | |
char * | argv[], | |||
char * | cwd, | |||
Jconf * | jconf | |||
) |
Option parsing.
argc | [in] number of elements in argv | |
argv | [in] array of argument strings | |
cwd | [in] current directory | |
jconf | [out] jconf structure to store data |
Definition at line 141 of file m_options.c.
Referenced by config_file_parse(), j_config_load_args(), and j_config_load_args_new().
void opt_release | ( | Jconf * | jconf | ) |
Free memories of variables allocated by option arguments.
jconf | [i/o] jconf configuration data |
Definition at line 1081 of file m_options.c.
Referenced by j_jconf_free().
void get_dirname | ( | char * | path | ) |
Get directory name from a path name of a file.
The trailing slash will be left, and the given buffer will be modified.
path | [i/o] file path name, will be modified to directory name |
Definition at line 153 of file m_jconf.c.
Referenced by config_file_parse(), and multigram_add_prefix_filelist().
boolean config_file_parse | ( | char * | conffile, | |
Jconf * | jconf | |||
) |
Read and parse a jconf file, and set the specified option values.
conffile | [in] jconf file path name | |
jconf | [out] global configuration data to be written. |
Definition at line 376 of file m_jconf.c.
Referenced by j_config_load_file(), j_config_load_file_new(), and opt_parse().
boolean checkpath | ( | char * | filename | ) |
Check if a file actually exist and is readable.
filename | [in] file path name |
Definition at line 49 of file m_chkparam.c.
Referenced by j_jconf_finalize(), multigram_add_prefix_filelist(), and multigram_add_prefix_list().
int set_beam_width | ( | WCHMM_INFO * | wchmm, | |
int | specified | |||
) |
Determine beam width on the 1st pass.
wchmm | [in] tree lexicon data | |
specified | [in] user-specified beam width (0: full search, -1: not specified) |
Definition at line 433 of file m_chkparam.c.
Referenced by j_launch_recognition_instance(), and multigram_rebuild_wchmm().
void print_jconf_overview | ( | Jconf * | jconf | ) |
Output module overview in a global configuration variables to log.
jconf | [in] global configuration variables |
Definition at line 42 of file m_info.c.
Referenced by j_jconf_finalize(), and print_engine_info().
void print_engine_info | ( | Recog * | recog | ) |
Output all informations of an engine instance to log.
recog | [in] engine instance |
Definition at line 149 of file m_info.c.
Referenced by j_recog_info().
boolean adin_initialize | ( | Recog * | recog | ) |
Set up audio input device according to the jconf configurations.
recog | [i/o] engine instance |
Definition at line 185 of file m_adin.c.
Referenced by j_adin_init().
boolean adin_initialize_user | ( | Recog * | recog, | |
void * | arg | |||
) |
Initialize audio input device using user-specified A/D-in functions.
The user functions and parameters (silence_cut_default and enable_thread) should be defined beforehand. See adin_select() for details.
recog | [i/o] engine instance | |
arg | [in] argument for adin_initialize |
Definition at line 265 of file m_adin.c.
Referenced by j_adin_init_user().
void create_mfcc_calc_instances | ( | Recog * | recog | ) |
Create MFCC calculation instance for AM processing instances and GMM.
If more than one AM processing instance (or GMM) has the same configuration, the same MFCC calculation instance will be shared among them.
recog | [i/o] engine instance |
Definition at line 771 of file m_fusion.c.
Referenced by j_final_fusion().
void hmm_check | ( | RecogProcess * | r | ) |
Mode to do interactive triphone conversion check ("-check triphone").
r | [in] recognition process instance |
Definition at line 303 of file hmm_check.c.
Referenced by j_launch_recognition_instance().
boolean gmm_init | ( | Recog * | recog | ) |
Initialization for computing GMM likelihoods.
This will be called once on startup.
recog | [i/o] engine instance |
Definition at line 407 of file gmm.c.
Referenced by j_final_fusion().
void gmm_prepare | ( | Recog * | recog | ) |
Prepare for the next GMM computation.
This will be called just before an input begins.
recog | [i/o] engine instance |
Definition at line 494 of file gmm.c.
Referenced by decode_proceed().
void gmm_proceed | ( | Recog * | recog | ) |
Compute output probabilities of all GMM for a given input vector, and accumulate the results to the gmm_score buffer.
When GMM_VAD is defined, VAD scores, "(maximum score of speech GMMs) - (maximum score of noise GMMs)" of last frames (jconf->detect.gmm_margin) will be stored for later VAD decision.
recog | [i/o] engine instance |
Definition at line 546 of file gmm.c.
Referenced by decode_proceed().
void gmm_end | ( | Recog * | recog | ) |
Finish the GMM computation for an input, and output the result.
The GMM of the maximum score is finally determined from the accumulated scores computed by gmm_proceed(), and compute the confidence score of the maximum GMM using posterior probability. Then the result will be output using result_gmm().
recog | [i/o] engine instance |
Definition at line 629 of file gmm.c.
Referenced by decode_end(), and decode_end_segmented().
boolean gmm_valid_input | ( | Recog * | recog | ) |
Return whether the last input was valid or invalid, from the result of GMM computation.
recog | [i/o] engine instance |
void gmm_free | ( | Recog * | recog | ) |
Free work area used for GMM calculation.
recog | [i/o] engine instance |
Definition at line 729 of file gmm.c.
Referenced by j_recog_free().
void wordgraph_init | ( | WCHMM_INFO * | wchmm | ) |
Define if you want debugging output for graph generation.
Define if you want much more debugging output for graph generation
Initialize data for graphout.
wchmm | [in] tree lexicon |
Definition at line 54 of file graphout.c.
void wordgraph_free | ( | WordGraph * | wg | ) |
Free a graph word.
wg | [in] graph word to be freed. |
Definition at line 181 of file graphout.c.
Referenced by free_node(), wordgraph_clean(), and wordgraph_exec_erase().
Output information of a graph word in text in the format below: (n means the word).
ID: left=left_context_ID[,ID,...] right=right_context_ID[,ID,...] [left_edge_frame...right_edge_frame] wid=word_id name="word string" lname="N-gram word string (Julius) or category number (Julian)" f="partial sentence score at left edge (g(n) + h(n+1)) on search time" f_prev="partial sentence score at right edge (g(n-1) + h(n)) on search time" g_head="accumulated viterbi score at left edge (g(n))" g_prev="accumulated viterbi score at right edge (g(n-1) + LM(n)" lscore="language score LM(n) (Julius only)" AMavg="average acoustic likelihood per frame" cmscore="confidence score"
fp | [in] file pointer to which output should go | |
wg | [in] graph word to output | |
winfo | [in] word dictionary |
Definition at line 2190 of file graphout.c.
Referenced by wordgraph_remove_context().
Output text information of all the words in word graph.
fp | [in] file pointer to which output should go | |
root | [in] pointer to root node of a word graph | |
winfo | [in] word dictionary |
Definition at line 2249 of file graphout.c.
WordGraph* wordgraph_assign | ( | WORD_ID | wid, | |
WORD_ID | wid_left, | |||
WORD_ID | wid_right, | |||
int | leftframe, | |||
int | rightframe, | |||
LOGPROB | fscore_head, | |||
LOGPROB | fscore_tail, | |||
LOGPROB | gscore_head, | |||
LOGPROB | gscore_tail, | |||
LOGPROB | lscore, | |||
LOGPROB | cm, | |||
RecogProcess * | r | |||
) |
Return a newly allocated graph word candidates.
The resulting word is not registered to the word graph yet.
wid | [in] word ID | |
wid_left | [in] word ID of left context for determining head phone | |
wid_right | [in] word ID of right context for determining tail phone | |
leftframe | [in] beginning time in frames | |
rightframe | [in] end time in frames | |
fscore_head | [in] sentence score on search at word head (g + h) | |
fscore_tail | [in] sentence score on search at word tail (g + h) | |
gscore_head | [in] Viterbi score accumulated from input end at word head (g) | |
gscore_tail | [in] Viterbi score accumulated from input end at word tail (g) | |
lscore | [in] language score | |
cm | [in] confidence score | |
r | [in] recognition process instance |
Definition at line 1899 of file graphout.c.
Check for the right context if the specified graph already exists, and add it if not yet.
wg | [i/o] graph word whose right context will be checked | |
right | [in] graph word to be checked as right context of wg | |
lscore | [in] word connection score |
Definition at line 347 of file graphout.c.
Referenced by wordgraph_adjust_boundary_sub(), and wordgraph_link_context().
Check for the left context if the specified graph already exists, and add it if not yet.
wg | [i/o] graph word whose left context will be checked | |
left | [in] graph word to be checked as left context of wg | |
lscore | [in] word connection score |
Definition at line 295 of file graphout.c.
Referenced by wordgraph_adjust_boundary_sub(), and wordgraph_link_context().
Register a graph word candidate to the word graph as a member.
The registered word will have the saved member to be set to TRUE.
wg | [i/o] graph word candidate to be registered | |
right | [i/o] right context graph word | |
root | [i/o] pointer to root node of already registered word graph |
Definition at line 1955 of file graphout.c.
void wordgraph_purge_leaf_nodes | ( | WordGraph ** | rootp, | |
RecogProcess * | r | |||
) |
Post-processing step 1: Extract initial word graph.
Extract initial word graph from generated word arcs while search, by purging leaf nodes and arcs that are not on the path from edge to edge.
rootp | [i/o] pointer to root node of a word graph | |
r | [in] recognition process instance |
Definition at line 941 of file graphout.c.
void wordgraph_depth_cut | ( | WordGraph ** | rootp, | |
RecogProcess * | r | |||
) |
Post-processing step 1.5: word graph depth cutting.
If GRAPHOUT_DEPTHCUT is defined, perform word graph depth cutting.
rootp | [i/o] pointer to root node of a word graph | |
r | [in] recognition process instance |
Definition at line 1050 of file graphout.c.
void wordgraph_adjust_boundary | ( | WordGraph ** | rootp, | |
RecogProcess * | r | |||
) |
Post-processing step 2: Adjust word boundaries.
When GRAPHOUT_PRECISE_BOUNDARY is defined, the word boundaries will be moved depending on the later word expansion to get context-dependent precise boundaries. So the precise boundary, modified after generation while search, should be propagated to the context words in the post processing.
Since the affect of word boundaries may propagate to the context words, the adjustment procedure has to be executed iteratively until all the boundaries are fixated. However, when graph is large, the oscillation of short words will results in very long loop. By defining GRAPHOUT_LIMIT_BOUNDARY_LOOP, the number of the adjustment loop can be up to the number specified by graphout_limit_bounrady_loop_num.
rootp | [i/o] pointer to root node of a word graph | |
r | [i/o] recognition process instance |
< frame list for adjust_boundary_sub
< frame score list for adjust_boundary_sub
Definition at line 1594 of file graphout.c.
void wordgraph_clean | ( | WordGraph ** | rootp | ) |
Free all the words in a word graph.
rootp | [i/o] pointer to root node of a word graph |
Definition at line 871 of file graphout.c.
Referenced by clear_result().
void wordgraph_compaction_thesame | ( | WordGraph ** | rootp | ) |
Post-processing step 3: Bundle words (exactly the same ones).
This function bundles same words which have exactly the same boundaries and partial sentence scores.
rootp | [i/o] pointer to root node of a word graph |
Definition at line 1669 of file graphout.c.
void wordgraph_compaction_exacttime | ( | WordGraph ** | rootp, | |
RecogProcess * | r | |||
) |
Post-processing step 4: Bundle words (same boundaries).
This function bundles the same words which have exactly the same boundaries, allowing having different scores. The word with the best partial sentence score will be adopted. This function will not take effect when graph_merge_neightbor_range is lower than 0.
rootp | [i/o] pointer to root node of a word graph | |
r | [i/o] recognition process instance |
Definition at line 1707 of file graphout.c.
void wordgraph_compaction_neighbor | ( | WordGraph ** | rootp, | |
RecogProcess * | r | |||
) |
Post-processing step 5: Bundle words (neighbor words).
This function bundles the same words which appears at similar place. If the difference of both the left boundary and right right boundary is under graph_merge_neighbor_range, it will be bundled. If its value is lower than or equal to 0, this function does not take effect.
rootp | [i/o] pointer to root node of a word graph | |
r | [i/o] recognition process instance |
Definition at line 1793 of file graphout.c.
int wordgraph_sort_and_annotate_id | ( | WordGraph ** | rootp, | |
RecogProcess * | r | |||
) |
Sort words by left time and annotate sequencial id for them in a word graph.
rootp | [i/o] address of pointer to root node of a word graph | |
r | [i/o] recognition process instance |
Definition at line 820 of file graphout.c.
void wordgraph_check_coherence | ( | WordGraph * | rootp, | |
RecogProcess * | r | |||
) |
For debug: Check the coherence in word graph.
rootp | [in] pointer to root node of a word graph | |
r | [i/o] recognition process instance |
Definition at line 2278 of file graphout.c.
void graph_forward_backward | ( | WordGraph * | root, | |
RecogProcess * | r | |||
) |
Compute graph-based confidence scores by forward-backward parsing on the generated lattice.
The computed scores are stored in graph_cm of each graph words. The same alpha value of search-time confidence scoring (r->config->annotate.cm_alpha) will be used to compute the posterior probabilities.
root | [in] root graph node | |
r | [in] recognition process instance |
Definition at line 2427 of file graphout.c.
void jconf_set_default_values | ( | Jconf * | j | ) |
Fill in the system default values to a parameter structure Jconf.
Only values of the Jconf will be set. The parameters in sub-structures (AM, LM, SEARCH) will not be set in this function: they should be initialized separatedly at each corresponding functions.
j | [in] parameter structure |
Definition at line 57 of file default.c.
Referenced by j_jconf_new().
void jconf_set_default_values_am | ( | JCONF_AM * | j | ) |
Fill in system default values to an AM parameter structure.
j | [in] AM configuration parameter structure |
Definition at line 114 of file default.c.
Referenced by j_jconf_am_new().
void jconf_set_default_values_lm | ( | JCONF_LM * | j | ) |
Fill in system default values to an LM parameter structure.
j | [in] LM configuration parameter structure |
Definition at line 163 of file default.c.
Referenced by j_jconf_lm_new().
void jconf_set_default_values_search | ( | JCONF_SEARCH * | j | ) |
Fill in system default values to a search parameter structure.
j | [in] search configuration parameter structure |
Definition at line 207 of file default.c.
Referenced by j_jconf_search_new().
boolean multigram_load_all_gramlist | ( | PROCESS_LM * | lm | ) |
Load all the grammars specified at startup.
lm | [i/o] LM processing instance |
Definition at line 883 of file multi-gram.c.
Referenced by j_load_lm().
void multigram_free_all | ( | MULTIGRAM * | root | ) |
Free all grammars.
root | [in] root pointer of grammar list |
Definition at line 986 of file multi-gram.c.
Referenced by j_process_lm_free().
Set up parameters for A/D-in and input detection.
Set variables in work area according to the configuration values.
adin | [in] AD-in work area | |
jconf | [in] configuration data |
Definition at line 138 of file adin-cut.c.
Referenced by adin_setup_all().
boolean adin_thread_create | ( | Recog * | recog | ) |
Start new A/D-in thread, and initialize buffer.
recog | [in] engine instance |
< Thread information
Definition at line 956 of file adin-cut.c.
Referenced by j_adin_init(), and j_adin_init_user().
Top function to start input processing.
If threading mode is enabled, this function simply enters to adin_thread_process() to process triggered samples detected by another running A/D-in thread.
If threading mode is not available or disabled by either device requirement or OS capability, this function simply calls adin_cut() to detect speech segment from input device and process them concurrently by one process.
ad_process | [in] function to process triggerted input. | |
ad_check | [in] function to be called periodically. | |
recog | [in] engine instance |
Definition at line 1185 of file adin-cut.c.
boolean adin_standby | ( | ADIn * | a, | |
int | freq, | |||
void * | arg | |||
) |
Call device-specific initialization.
a | [in] A/D-in work area | |
freq | [in] sampling frequency | |
arg | [in] device-dependent argument |
Definition at line 1214 of file adin-cut.c.
Referenced by adin_setup_all().
boolean adin_begin | ( | ADIn * | a | ) |
Call device-specific function to begin capturing of the audio stream.
a | [in] A/D-in work area |
Definition at line 1237 of file adin-cut.c.
boolean adin_end | ( | ADIn * | a | ) |
Call device-specific function to end capturing of the audio stream.
a | [in] A/D-in work area |
Definition at line 1259 of file adin-cut.c.
void adin_free_param | ( | Recog * | recog | ) |
Free memories of A/D-in work area.
recog | [in] engine instance |
Definition at line 1280 of file adin-cut.c.
Referenced by j_recog_free().
CN_CLUSTER* confnet_create | ( | WordGraph * | root, | |
RecogProcess * | r | |||
) |
void graph_make_order | ( | WordGraph * | root, | |
RecogProcess * | r | |||
) |
void cn_free_all | ( | CN_CLUSTER ** | croot | ) |
Free all cluster holders.
croot | [out] pointer to root pointer of cluster holder list. |
Definition at line 267 of file confnet.c.
Referenced by clear_result().
void callback_init | ( | Recog * | recog | ) |
Initialize callback management area.
recog | [i/o] engine instance |
Definition at line 53 of file callback.c.
Referenced by j_recog_new().
void callback_exec | ( | int | code, | |
Recog * | recog | |||
) |
Execute all functions assigned to a callback registory.
code | [in] callback code | |
recog | [in] engine instance. |
Definition at line 183 of file callback.c.
Referenced by adin_cut(), callback_check_in_adin(), decode_proceed(), get_back_trellis(), gmm_end(), RealTimeParam(), RealTimePipeLine(), and RealTimeResume().
Execute all functions assigned to a A/D-in callback.
code | [in] callbcak code | |
recog | [in] engine instance | |
buf | [in] buffer that holds the current input speech which will be passed to the functions | |
len | [in] length of buf |
Definition at line 214 of file callback.c.
Referenced by adin_cut().
void result_sentence_malloc | ( | RecogProcess * | r, | |
int | num | |||
) |
Allocate storage of recognition results.
r | [out] recognition process instance | |
num | [in] number of sentences to be output |
Definition at line 208 of file recogmain.c.
void result_sentence_free | ( | RecogProcess * | r | ) |
Free storage of recognition results.
r | [i/o] recognition process instance |
Definition at line 239 of file recogmain.c.
Referenced by clear_result().
void clear_result | ( | RecogProcess * | r | ) |
Clear all result storages for next input.
r | [in] recognition process instance. |
Definition at line 271 of file recogmain.c.