#include <julius/julius.h>
Go to the source code of this file.
Functions | |
static int | gmm_find_insert_point (GMMCalc *gc, LOGPROB score, int len) |
Return insertion point where a computed Gaussian score should be inserted in current list of computed Gaussians. | |
static int | gmm_cache_push (GMMCalc *gc, int id, LOGPROB score, int len) |
Store a Gaussian likelihood to the list of computed Gaussians. | |
static LOGPROB | gmm_compute_g_base (GMMCalc *gc, HTK_HMM_Dens *binfo) |
Compute an output probability of a Gaussian for the input vector of current frame. | |
static LOGPROB | gmm_compute_g_safe (GMMCalc *gc, HTK_HMM_Dens *binfo, LOGPROB thres) |
Compute an output probability of a Gaussian for the input vector of current frame. | |
static void | gmm_gprune_safe_init (GMMCalc *gc, HTK_HMM_INFO *hmminfo, int prune_num) |
Allocate work area for Gaussian pruning for GMM calculation. | |
static void | gmm_gprune_safe (GMMCalc *gc, HTK_HMM_Dens **g, int gnum) |
Compute scores for a set of Gaussians with Gaussian pruning for the current frame. | |
static LOGPROB | gmm_calc_mix (GMMCalc *gc, HTK_HMM_State *state) |
Compute the output probability of a GMM state for the current frame. | |
static LOGPROB | outprob_state_nocache (GMMCalc *gc, int t, HTK_HMM_State *stateinfo, HTK_Param *param) |
Main function to compute the output probability of a GMM state for the specified input frame. | |
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. |
When a Gaussian Mixture Model (GMM) is specified on startup, Julius/Julian will compute the frame-wise likelihoods of each GMM for given inputs, and produces the accumulated scores for each. Then the input rejection is determined from the value. Actually, the recognition will be computed on-line concurrently with the 1st pass, and the result will be got as soon as the 1st pass ends.
Gaussian pruning is performed using the safe algorithm in the computation of GMM scores. In each frame, pruning will be done to fully compute only the top N Gaussians. The algorithm is slightly simpler than AM computation, i.e. the score order of the previous frame is not used here.
When GMM_VAD is defined, a GMM-based VAD will be enabled in addition to the input rejection, using the scheme of short-pause segmentation.
Definition in file gmm.c.
Return insertion point where a computed Gaussian score should be inserted in current list of computed Gaussians.
gc | [i/o] work area for GMM calculation | |
score | [in] a score to be inserted | |
len | [in] current length of the list |
Definition at line 80 of file gmm.c.
Referenced by gmm_cache_push().
Store a Gaussian likelihood to the list of computed Gaussians.
gc | [i/o] work area for GMM calculation | |
id | [in] id of a Gaussian in the GMM to be stored | |
score | [in] the likelihood of the Gaussian to be stored | |
len | [in] current list length (= current number of Gaussians in cache) |
Definition at line 121 of file gmm.c.
Referenced by gmm_gprune_safe().
static LOGPROB gmm_compute_g_base | ( | GMMCalc * | gc, | |
HTK_HMM_Dens * | binfo | |||
) | [static] |
Compute an output probability of a Gaussian for the input vector of current frame.
No Gaussian pruning is performed in this function.
gc | [i/o] work area for GMM calculation | |
binfo | [in] Gaussian |
Definition at line 177 of file gmm.c.
Referenced by gmm_gprune_safe().
static LOGPROB gmm_compute_g_safe | ( | GMMCalc * | gc, | |
HTK_HMM_Dens * | binfo, | |||
LOGPROB | thres | |||
) | [static] |
Compute an output probability of a Gaussian for the input vector of current frame.
Safe pruning is performed in this function.
gc | [i/o] work area for GMM calculation | |
binfo | [in] Gaussian | |
thres | [in] pruning threshold for safe pruning |
Definition at line 219 of file gmm.c.
Referenced by gmm_gprune_safe().
static void gmm_gprune_safe_init | ( | GMMCalc * | gc, | |
HTK_HMM_INFO * | hmminfo, | |||
int | prune_num | |||
) | [static] |
Allocate work area for Gaussian pruning for GMM calculation.
gc | [i/o] work area for GMM calculation | |
hmminfo | [in] HMM structure | |
prune_num | [in] number of top Gaussians to be computed at the pruning |
Definition at line 257 of file gmm.c.
Referenced by gmm_init().
static void gmm_gprune_safe | ( | GMMCalc * | gc, | |
HTK_HMM_Dens ** | g, | |||
int | gnum | |||
) | [static] |
Compute scores for a set of Gaussians with Gaussian pruning for the current frame.
Gaussian pruning will be performed to guarantee only the top N Gaussians to be fully computed. The results will be stored in the list of computed Gaussians in OP_calced_score and OP_calced_id.
gc | [i/o] work area for GMM calculation | |
g | [in] set of Gaussians | |
gnum | [in] length of g |
Definition at line 296 of file gmm.c.
Referenced by gmm_calc_mix().
static LOGPROB gmm_calc_mix | ( | GMMCalc * | gc, | |
HTK_HMM_State * | state | |||
) | [static] |
Compute the output probability of a GMM state for the current frame.
gc | [i/o] work area for GMM calculation | |
state | [in] GMM state |
Definition at line 334 of file gmm.c.
Referenced by outprob_state_nocache().
static LOGPROB outprob_state_nocache | ( | GMMCalc * | gc, | |
int | t, | |||
HTK_HMM_State * | stateinfo, | |||
HTK_Param * | param | |||
) | [static] |
Main function to compute the output probability of a GMM state for the specified input frame.
gc | [i/o] work area for GMM calculation | |
t | [in] time frame on which the output probability should be computed | |
stateinfo | [in] GMM state | |
param | [in] input vector sequence |
Definition at line 397 of file gmm.c.
Referenced by gmm_proceed().
Initialization for computing GMM likelihoods.
This will be called once on startup.
recog | [i/o] engine instance |
Definition at line 429 of file gmm.c.
Referenced by j_final_fusion().
Here is the caller graph for this function:
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 522 of file gmm.c.
Referenced by decode_proceed().
Here is the caller graph for this function:
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 574 of file gmm.c.
Referenced by decode_proceed().
Here is the caller graph for this function:
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 657 of file gmm.c.
Referenced by decode_end(), and decode_end_segmented().
Here is the caller graph for this function:
Return whether the last input was valid or invalid, from the result of GMM computation.
recog | [i/o] engine instance |
Definition at line 734 of file gmm.c.
Referenced by j_recognize_stream_core().
Here is the caller graph for this function:
void gmm_free | ( | Recog * | recog | ) |
Free work area used for GMM calculation.
recog | [i/o] engine instance |
Definition at line 758 of file gmm.c.
Referenced by j_recog_free().
Here is the caller graph for this function: