#include <s3types.h>
#include <logmath.h>
Go to the source code of this file.
Classes | |
| struct | mgau_t |
| A single mixture-Gaussian model for one senone (see above comment). More... | |
| struct | mgau_model_t |
| The set of mixture-Gaussians in an acoustic model used in Sphinx 3.X family of tool. More... | |
Defines | |
| #define | CONTHMM 10001 |
| #define | SEMIHMM 10002 |
| #define | FULL_INT_COMP 20001 |
| #define | FULL_FLOAT_COMP 20002 |
| #define | MIX_INT_FLOAT_COMP 20003 |
| #define | MGAU_MEAN 1 |
| #define | MGAU_VAR 2 |
| #define | MGAU_FULLVAR 3 |
| #define | NO_BSTIDX -1 |
| #define | NOT_UPDATED -100 |
| #define | mgau_n_mgau(g) ((g)->n_mgau) |
| #define | mgau_max_comp(g) ((g)->max_comp) |
| #define | mgau_veclen(g) ((g)->veclen) |
| #define | mgau_n_comp(g, m) ((g)->mgau[m].n_comp) |
| #define | mgau_mean(g, m, c) ((g)->mgau[m].mean[c]) |
| #define | mgau_var(g, m, c) ((g)->mgau[m].var[c]) |
| #define | mgau_fullvar(g, m, c) ((g)->mgau[m].fullvar[c]) |
| #define | mgau_mixw(g, m, c) ((g)->mgau[m].mixw[c]) |
| #define | mgau_mixw_f(g, m, c) ((g)->mgau[m].mixw_f[c]) |
| #define | mgau_lrd(g, m, c) ((g)->mgau[m].lrd[c]) |
| #define | mgau_lrdi(g, m, c) ((g)->mgau[m].lrdi[c]) |
| #define | mgau_frm_sen_eval(g) ((g)->frm_sen_eval) |
| #define | mgau_frm_gau_eval(g) ((g)->frm_gau_eval) |
| #define | mgau_frm_cisen_eval(g) ((g)->frm_ci_sen_eval) |
| #define | mgau_frm_cigau_eval(g) ((g)->frm_ci_gau_eval) |
Functions | |
| S3DECODER_EXPORT mgau_model_t * | mgau_init (const char *meanfile, const char *varfile, float64 varfloor, const char *mixwfile, float64 mixwfloor, int32 precomp, const char *senmgau, int32 comp_type, logmath_t *logmath) |
| int32 | mgau_var_nzvec_floor (mgau_model_t *g, float64 floor) |
| S3DECODER_EXPORT int32 | mgau_eval (mgau_model_t *g, int32 m, int32 *active_comp, float32 *x, int32 fr, int32 bUpdBstIdx) |
| S3DECODER_EXPORT int32 | mgau_comp_eval (mgau_model_t *g, int32 m, float32 *x, int32 *score) |
| int32 | mgau_dump (mgau_model_t *g, int32 type) |
| S3DECODER_EXPORT void | mgau_free (mgau_model_t *g) |
| S3DECODER_EXPORT int32 | mgau_mean_reload (mgau_model_t *g, const char *mean_file_name) |
| S3DECODER_EXPORT int32 | mgau_var_reload (mgau_model_t *g, const char *var_file_name) |
| int32 | mgau_precomp (mgau_model_t *g) |
|
|
Specification of sets of GMM |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Access number of GMMs mgau_max_comp Access the maximum number of components. It can be different across GMMs mgau_veclen Access an integer array contains the size of each stream mgau_n_comp Access the number of component for a particular mixture in a GMM mgau_mean Access the mean mgau_var Access the variance mgau_lrd Access the floating point version of the Gaussian constant mgau_lrd Access the integer version of the Gaussian constant mgau_frm_sen_eval Number of senones evaluated in this frame mgau_frm_gau_eval Number of gaussians evaluated in this frame mgau_frm_ci_sen_eval Number of CI senones evaluated in this frame mgau_frm_ci_gau_eval Number of CI gaussians evaluated in this frame |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||||||||||
|
Out: Array of scores for each component
|
|
||||||||||||
|
A routine that dump all mean and variance parameters of a set of gaussian distribution.
|
|
||||||||||||||||||||||||||||
|
Compute the log likelihood of a Gaussian mixture model in fixed-point. Notice that within the program, the Gaussian distribution is computed using floating point. But log-add is done in fixed point (usually by table lookup).
|
|
|
ARCHAN, I noticed this program because of Ricky's comment. In 2004, a very useful tool called valgrind started to be available for Linux. This tool allows me to pick up a lot of memory problems easily.
|
|
||||||||||||||||||||||||||||||||||||||||
|
At the moment, S3 models have the same # of means in each codebook and 1 var/mean
|
|
||||||||||||
|
reload the mean file
|
|
|
Some of the Mahalanobis distance computation (between Gaussian density means and given vectors) can be carried out in advance. (See comment in .h file.) |
|
||||||||||||
|
Floor any variance vector that is non-zero (vector).
|
|
||||||||||||
|
reload the mean file
|
1.3.9.1