libjulius/src/gmm.c File Reference

Input rejection and VAD using GMM. More...

#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 *s)
 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.


Detailed Description

Input rejection and VAD using GMM.

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.

Author:
Akinobu LEE
Date:
Tue Mar 15 05:14:10 2005
Revision
1.1.1.1

Definition in file gmm.c.


Function Documentation

static int gmm_find_insert_point ( GMMCalc gc,
LOGPROB  score,
int  len 
) [static]

Return insertion point where a computed Gaussian score should be inserted in current list of computed Gaussians.

Parameters:
gc [i/o] work area for GMM calculation
score [in] a score to be inserted
len [in] current length of the list
Returns:
index to insert the value at the list.

Definition at line 80 of file gmm.c.

Referenced by gmm_cache_push().

static int gmm_cache_push ( GMMCalc gc,
int  id,
LOGPROB  score,
int  len 
) [static]

Store a Gaussian likelihood to the list of computed Gaussians.

Parameters:
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)
Returns:
the current length of list after the storing.

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.

Parameters:
gc [i/o] work area for GMM calculation
binfo [in] Gaussian
Returns:
the log output probability.

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.

Parameters:
gc [i/o] work area for GMM calculation
binfo [in] Gaussian
thres [in] pruning threshold for safe pruning
Returns:
the log output probability.

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.

Parameters:
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.

Parameters:
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 s 
) [static]

Compute the output probability of a GMM state for the current frame.

Parameters:
gc [i/o] work area for GMM calculation
s [in] GMM state
Returns:
the log probability.

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.

Parameters:
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
Returns:
the log output probability.

Definition at line 378 of file gmm.c.

Referenced by gmm_proceed().

boolean gmm_init ( Recog recog  ) 

Initialization for computing GMM likelihoods.

This will be called once on startup.

Parameters:
recog [i/o] engine instance

Definition at line 407 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.

Parameters:
recog [i/o] engine instance

Definition at line 494 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.

Parameters:
recog [i/o] engine instance

Definition at line 546 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().

Parameters:
recog [i/o] engine instance

Definition at line 629 of file gmm.c.

Referenced by decode_end(), and decode_end_segmented().

Here is the caller graph for this function:

boolean gmm_valid_input ( Recog recog  ) 

Return whether the last input was valid or invalid, from the result of GMM computation.

Parameters:
recog [i/o] engine instance
Returns:
TRUE if input is valid, i.e. the name of maximum GMM is not included in gmm_reject_cmn_string, or FALSE if input is invalid, i.e. the name is included in that string.

Definition at line 705 of file gmm.c.

void gmm_free ( Recog recog  ) 

Free work area used for GMM calculation.

Parameters:
recog [i/o] engine instance

Definition at line 729 of file gmm.c.

Referenced by j_recog_free().

Here is the caller graph for this function:


Generated on Tue Dec 18 16:01:04 2007 for Julius by  doxygen 1.5.4