Classes | Functions
fast_algo_struct.h File Reference

File that implement various structure for fast algorithms. fast_algo_struct implement beam_t, histprune_t, pl_t and fast_algo_struct_t. More...

#include <s3types.h>
#include <mdef.h>
#include <ascr.h>
#include <logmath.h>

Go to the source code of this file.

Classes

struct  beam_t
 Structure that contains all beam parameters for beam pruning in Viterbi algorithm. More...
 
struct  pl_t
 Structure that contains all parameters for phoneme lookahead. More...
 
struct  histprune_t
 Structure containing various histogram pruning parameters and internal storage All in integers. More...
 
struct  downsampling_t
 Structure containing various parameters for downsampling. More...
 
struct  gmm_select_t
 Structure that contains all parameters for CI-based GMM selection. More...
 
struct  gau_select_t
 Structure that contains all parameters related to Gaussian selection. More...
 
struct  fast_gmm_t
 Structure that contains all parameter related to 4-Level Fast GMM computation. More...
 

Functions

beam_tbeam_init (float64 hmm, float64 ptr, float64 wd, float64 wdend, int32 ptranskip, int32 n_ciphone, logmath_t *logmath)
 
void beam_report (beam_t *b)
 
void beam_free (beam_t *b)
 
histprune_thistprune_init (int32 maxhmm, int32 maxhist, int32 maxword, int32 hmmhistbinsize, int32 numNodes)
 
void histprune_zero_histbin (histprune_t *h)
 
void histprune_update_histbinsize (histprune_t *h, int32 hmmhistbinsize, int32 numNodes)
 
void histprune_report (histprune_t *h)
 
void histprune_showhistbin (histprune_t *hp, int32 nfr, char *uttid)
 
void histprune_free (histprune_t *h)
 
S3DECODER_EXPORT fast_gmm_tfast_gmm_init (int32 down_sampling_ratio, int32 mode_cond_ds, int32 mode_dist_ds, int32 isGS4GS, int32 isSVQ4SVQ, float64 subvqbeam, float64 cibeam, float32 tighten_factor, int32 max_cd, int32 n_ci_sen, logmath_t *logmath)
 
void fast_gmm_report (fast_gmm_t *f)
 
S3DECODER_EXPORT void fast_gmm_free (fast_gmm_t *fg)
 
pl_tpl_init (int32 pheurtype, int32 pl_beam, int32 n_ciphone, logmath_t *logmath)
 
void pl_report (pl_t *pl)
 
void pl_free (pl_t *pl)
 
void pl_computePhnHeur (mdef_t *md, ascr_t *a, pl_t *pl, int32 heutype, int32 win_strt, int32 win_efv)
 

Detailed Description

File that implement various structure for fast algorithms. fast_algo_struct implement beam_t, histprune_t, pl_t and fast_algo_struct_t.

Function Documentation

◆ beam_free()

void beam_free ( beam_t b)

free the beam_t data structure

Parameters
bbeam data structure

◆ beam_init()

beam_t* beam_init ( float64  hmm,
float64  ptr,
float64  wd,
float64  wdend,
int32  ptranskip,
int32  n_ciphone,
logmath_t *  logmath 
)

Create and initialize a beam_t structure, with the given parameters, converting them from prob space to logs3 space.
Note the last parameter is used in controling when the word beam is applied.

Returns
a pointer to created structure if successful, NULL otherwise.
Parameters
hmmInput: hmm beam
ptrInput: phone transition beam
wdInput: word beam
wdendInput: word end beam.
ptranskipInput: whether to apply phoneme transition beam rather than word beam.
n_ciphoneInput: number of ciphone to initialized arrays used in word end pruning.

◆ beam_report()

void beam_report ( beam_t b)

report the content of the beam_t data structure

Parameters
bbeam data structure

◆ fast_gmm_free()

S3DECODER_EXPORT void fast_gmm_free ( fast_gmm_t fg)

Free the fast_gmm_t structure

Parameters
fgInput: structure to free

◆ fast_gmm_init()

S3DECODER_EXPORT fast_gmm_t* fast_gmm_init ( int32  down_sampling_ratio,
int32  mode_cond_ds,
int32  mode_dist_ds,
int32  isGS4GS,
int32  isSVQ4SVQ,
float64  subvqbeam,
float64  cibeam,
float32  tighten_factor,
int32  max_cd,
int32  n_ci_sen,
logmath_t *  logmath 
)

Create and initialize a fast_gmm_t structure, withe the given parameters

Parameters
down_sampling_ratioInput: The frame down-sampling ratio
mode_cond_dsInput: Whether conditional down sampling is used
mode_dist_dsInput: (NOT USED) Whether distance-based down sampling is used
isGS4GSInput: Whether Gaussian selection map is only used for Gaussian Selection. Not for down sampling
isSVQ4SVQInput: Whether SVQ is used in acoustic model computation.
subvqbeamInput: Subvq beam
cibeamInput: CI phone beam
tighten_factorInput : A tightening factor used in down sampling
max_cdInput: Max CD senone to be computed
n_ci_senInput: no. of ci senone, use to initialize the ci_occ array

◆ fast_gmm_report()

void fast_gmm_report ( fast_gmm_t f)

report the content of the fast_gmm_t data structure

Parameters
fInput: the fast GMM computation structure

◆ histprune_free()

void histprune_free ( histprune_t h)

free the histprune data structure

Parameters
hInput/Output :histprune structure

◆ histprune_init()

histprune_t* histprune_init ( int32  maxhmm,
int32  maxhist,
int32  maxword,
int32  hmmhistbinsize,
int32  numNodes 
)

Create and initialize a histprune_t structure, with the given parameters.

Parameters
maxhmmInput: Maximum HMM per frame
maxhistInput: Maximum history per frame
hmmhistbinsizeInput: Maximum no. words per frame Input: The size of each histogram
numNodesInput: The number of nodes in the tree (or graph?)

◆ histprune_report()

void histprune_report ( histprune_t h)

report the content of the histprune_t data structure

Parameters
hInput: histprune structure

◆ histprune_showhistbin()

void histprune_showhistbin ( histprune_t hp,
int32  nfr,
char *  uttid 
)

report the histogram bins

Parameters
hpInput: histprune structure
nfrNumber of frames in an utterance
uttidUtterance ID

◆ histprune_update_histbinsize()

void histprune_update_histbinsize ( histprune_t h,
int32  hmmhistbinsize,
int32  numNodes 
)
Parameters
hInput: histprune structure
hmmhistbinsizeInput: The size of each histogram
numNodesInput: The number of nodes in the tree (or graph?)

◆ histprune_zero_histbin()

void histprune_zero_histbin ( histprune_t h)
Parameters
hInput: histpurne structure

◆ pl_computePhnHeur()

void pl_computePhnHeur ( mdef_t md,
ascr_t a,
pl_t pl,
int32  heutype,
int32  win_strt,
int32  win_efv 
)

Phoneme look-ahead and compute phoneme heuristic. This routine will compute a phone heuristic scores with lookahead win_efv frame and start at frame win_strt.

Parameters
mdInput: a model definition file
aInput: an acoustic score data structure
plInput: a phoneme-lookahead data structure
heutypeInput: type of heuristic used
win_strtInput: Starting frame of a window
win_efvInput: The effective window size

◆ pl_free()

void pl_free ( pl_t pl)

Free the phoneme lookahead data structure

Parameters
plInput/Output: a phoneme looahead data structure

◆ pl_init()

pl_t* pl_init ( int32  pheurtype,
int32  pl_beam,
int32  n_ciphone,
logmath_t *  logmath 
)

Create and initialize the pl_t data structure

Returns
an initialized phoneme lookahead data structure
Parameters
pheurtypeInput: Phoneme lookahead heuristic types TBD: (NOT DETAIL ENOUGH)
pl_beamInput: Phoneme lookahead beam
n_ciphoneInput: Number of CI phones used in the cache size.

◆ pl_report()

void pl_report ( pl_t pl)

report the content of the phoneme lookahead data structure pl_t

Parameters
plInput: a phoneme lookahead data structure