src/libpocketsphinx/ms_senone.h File Reference

(Sphinx 3.0 specific) multiple streams senones. More...

#include <err.h>
#include <ckd_alloc.h>
#include <cmd_ln.h>
#include <logmath.h>
#include "ms_gauden.h"

Go to the source code of this file.

Data Structures

struct  senone_t
 8-bit senone PDF structure. More...

Typedefs

typedef uint8 senprob_t
 Senone logs3-probs, truncated to 8 bits.

Functions

senone_tsenone_init (gauden_t *g, char const *mixwfile, char const *mgau_mapfile, float32 mixwfloor, logmath_t *lmath)
 Load a set of senones (mixing weights and mixture gaussian codebook mappings) from the given files.
void senone_free (senone_t *s)
 Release memory allocated by senone_init.
int32 senone_eval (senone_t *s, int id, gauden_dist_t **dist, int n_top)
 Evaluate the score for the given senone wrt to the given top N gaussian codewords.
void senone_eval_all (senone_t *s, gauden_dist_t **dist, int32 n_top, int16 *senscr)
 Like senone_eval, but compute all senone scores for the shared density case (ie, number of codebooks = 1).


Detailed Description

(Sphinx 3.0 specific) multiple streams senones.

used with ms_gauden.h In Sphinx 3.0 family of tools, ms_senone is used to combine the Gaussian scores. Its existence is crucial in Sphinx 3.0 because 3.0 supports both SCHMM and CDHMM. There are optimization scheme for SCHMM (e.g. compute the top-N Gaussian) that is applicable to SCHMM than CDHMM. This is wrapped in senone_eval_all.

Definition in file ms_senone.h.


Function Documentation

int32 senone_eval ( senone_t s,
int  id,
gauden_dist_t **  dist,
int  n_top 
)

Evaluate the score for the given senone wrt to the given top N gaussian codewords.

Returns:
senone score (in logs3 domain).
Parameters:
id In: senone for which score desired
dist In: top N codewords and densities for all features, to be combined into senone score. IE, dist[f][i] = i-th best <codeword,density> for feaure f
n_top In: Length of dist[f], for each f

void senone_eval_all ( senone_t s,
gauden_dist_t **  dist,
int32  n_top,
int16 *  senscr 
)

Like senone_eval, but compute all senone scores for the shared density case (ie, number of codebooks = 1).

Parameters:
s In: Senone structure
dist In: as in senone_eval above
n_top In: as in senone_eval above
senscr Out: Upon return, senscr[i] will contain score for senone i

Definition at line 406 of file ms_senone.c.

References senone_t::featscr, senone_t::lmath, senone_t::n_feat, senone_t::n_gauden, senone_t::n_sen, senone_t::pdf, and SENSCR_SHIFT.

void senone_free ( senone_t s  ) 

Release memory allocated by senone_init.

In: The senone_t to free

Definition at line 335 of file ms_senone.c.

References senone_t::featscr, senone_t::lmath, senone_t::mgau, and senone_t::pdf.

senone_t* senone_init ( gauden_t g,
char const *  mixwfile,
char const *  mgau_mapfile,
float32  mixwfloor,
logmath_t *  lmath 
)

Load a set of senones (mixing weights and mixture gaussian codebook mappings) from the given files.

Normalize weights for each codebook, apply the given floor, convert PDF values to logs3 domain and quantize to 8-bits.

Returns:
pointer to senone structure created. Caller MUST NOT change its contents.
Parameters:
g In: codebooks
mixwfile In: mixing weights file
mgau_mapfile In: file specifying mapping from each senone to mixture gaussian codebook. If NULL all senones map to codebook 0
mixwfloor In: Floor value for senone weights
lmath In: log math computation

Definition at line 281 of file ms_senone.c.

References senone_t::featscr, senone_t::lmath, senone_t::mgau, senone_t::mixwfloor, senone_t::n_gauden, gauden_t::n_mgau, senone_t::n_sen, and SENSCR_SHIFT.


Generated on Wed Aug 26 11:24:49 2009 for PocketSphinx by  doxygen 1.5.8