src/libpocketsphinx/ms_gauden.h File Reference

(Sphinx 3.0 specific) Gaussian density module. More...

#include <feat.h>
#include <logmath.h>
#include "vector.h"
#include "hmm.h"

Go to the source code of this file.

Data Structures

struct  gauden_dist_t
 Structure to store distance (density) values for a given input observation wrt density values in some given codebook. More...
struct  gauden_t
 Multivariate gaussian mixture density parameters. More...

Functions

gauden_tgauden_init (char const *meanfile, char const *varfile, float32 varfloor, logmath_t *lmath)
 Read mixture gaussian codebooks from the given files.
void gauden_free (gauden_t *g)
 Release memory allocated by gauden_init.
int32 gauden_dist (gauden_t *g, int mgau, int n_top, mfcc_t **obs, gauden_dist_t **out_dist)
 Compute gaussian density values for the given input observation vector wrt the specified mixture gaussian codebook (which may consist of several feature streams).
void gauden_dump (const gauden_t *g)
 Dump the definitionn of Gaussian distribution.
void gauden_dump_ind (const gauden_t *g, int senidx)
 Dump the definition of Gaussian distribution of a particular index to the standard output stream.


Detailed Description

(Sphinx 3.0 specific) Gaussian density module.

Gaussian density distribution implementation. There are two major difference bettwen ms_gauden and cont_mgau. One is the fact that ms_gauden only take cares of the Gaussian computation part where cont_mgau actually take care of senone computation as well. The other is the fact that ms_gauden is a multi-stream implementation of GMM computation.

Definition in file ms_gauden.h.


Function Documentation

int32 gauden_dist ( gauden_t g,
int  mgau,
int  n_top,
mfcc_t **  obs,
gauden_dist_t **  out_dist 
)

Compute gaussian density values for the given input observation vector wrt the specified mixture gaussian codebook (which may consist of several feature streams).

Density values are left UNnormalized.

Returns:
0 if successful, -1 otherwise.
Parameters:
g In: handle to entire ensemble of codebooks
mgau In: codebook for which density values to be evaluated (g->{mean,var}[mgau])
n_top In: Number top densities to be evaluated
obs In: Observation vector; obs[f] = for feature f
out_dist Out: n_top best codewords and density values, in worsening order, for each feature stream. out_dist[f][i] = i-th best density for feature f. Caller must allocate memory for this output

void gauden_dump ( const gauden_t g  ) 

Dump the definitionn of Gaussian distribution.

Parameters:
g In: Gaussian distribution g

Definition at line 138 of file ms_gauden.c.

References gauden_t::n_mgau.

void gauden_dump_ind ( const gauden_t g,
int  senidx 
)

Dump the definition of Gaussian distribution of a particular index to the standard output stream.

Parameters:
g In: Gaussian distribution g
senidx In: The senone index of the Gaussian

Definition at line 148 of file ms_gauden.c.

References gauden_t::det, gauden_t::featlen, gauden_t::mean, gauden_t::n_density, gauden_t::n_feat, and gauden_t::var.

void gauden_free ( gauden_t g  ) 

Release memory allocated by gauden_init.

In: The gauden_t to free

Definition at line 399 of file ms_gauden.c.

References gauden_t::det, gauden_t::featlen, gauden_t::mean, and gauden_t::var.

gauden_t* gauden_init ( char const *  meanfile,
char const *  varfile,
float32  varfloor,
logmath_t *  lmath 
)

Read mixture gaussian codebooks from the given files.

Allocate memory space needed for them. Apply the specified variance floor value. Return value: ptr to the model created; NULL if error. (See Sphinx3 model file-format documentation.)

Parameters:
meanfile Input: File containing means of mixture gaussians
varfile Input: File containing variances of mixture gaussians
varfloor Input: Floor value to be applied to variances

Definition at line 361 of file ms_gauden.c.

References gauden_t::featlen, gauden_t::lmath, gauden_t::mean, gauden_t::n_density, gauden_t::n_feat, gauden_t::n_mgau, and gauden_t::var.


Generated on Wed Aug 26 11:25:47 2009 for PocketSphinx by  doxygen 1.5.8