ms_senone.h File Reference

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

`#include <sphinxbase/err.h>`
`#include <sphinxbase/ckd_alloc.h>`
`#include <sphinxbase/cmd_ln.h>`
`#include <sphinxbase/logmath.h>`
`#include "ms_gauden.h"`
`#include "bin_mdef.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_t * | senone_init (gauden_t *g, char const *mixwfile, char const *mgau_mapfile, float32 mixwfloor, logmath_t *lmath, bin_mdef_t *mdef)
| Load a set of senones (mixing weights and mixture gaussian codebook mappings) from the given files. More...
void | senone_free (senone_t *s)
| Release memory allocated by senone_init. More...
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. More...

## 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

## senone_eval()

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

## senone_free()

void senone_free | ( | senone_t * | s | ) |

Release memory allocated by senone_init.

In: The senone_t to free

Definition at line 341 of file ms_senone.c.

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

## senone_init()

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

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
  mdef | In: model definition

Definition at line 275 of file ms_senone.c.

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