PocketSphinx  0.6
acmod_s Struct Reference

Acoustic model structure. More...

#include <acmod.h>

Data Fields

cmd_ln_t * config
 Configuration. More...
 
logmath_t * lmath
 Log-math computation. More...
 
glist_t strings
 Temporary acoustic model filenames. More...
 
fe_t * fe
 Acoustic feature computation. More...
 
feat_t * fcb
 Dynamic feature computation. More...
 
bin_mdef_tmdef
 Model definition. More...
 
tmat_ttmat
 Transition matrices. More...
 
ps_mgau_tmgau
 Model parameters. More...
 
ps_mllr_tmllr
 Speaker transformation. More...
 
int16 * senone_scores
 GMM scores for current frame. More...
 
bitvec_t * senone_active_vec
 Active GMMs in current frame. More...
 
uint8 * senone_active
 Array of deltas to active GMMs. More...
 
int senscr_frame
 Frame index for senone_scores. More...
 
int n_senone_active
 Number of active GMMs. More...
 
int log_zero
 Zero log-probability value. More...
 
mfcc_t ** mfc_buf
 Temporary buffer of acoustic features. More...
 
mfcc_t *** feat_buf
 Temporary buffer of dynamic features. More...
 
FILE * rawfh
 File for writing raw audio data. More...
 
FILE * mfcfh
 File for writing acoustic feature data. More...
 
FILE * senfh
 File for writing senone score data. More...
 
FILE * insenfh
 Input senone score file. More...
 
long * framepos
 File positions of recent frames in senone file. More...
 
uint8 state
 State of utterance processing. More...
 
uint8 compallsen
 Compute all senones?
 
uint8 grow_feat
 Whether to grow feat_buf. More...
 
uint8 insen_swap
 Whether to swap input senone score. More...
 
frame_idx_t output_frame
 Index of next frame of dynamic features. More...
 
frame_idx_t n_mfc_alloc
 Number of frames allocated in mfc_buf.
 
frame_idx_t n_mfc_frame
 Number of frames active in mfc_buf.
 
frame_idx_t mfc_outidx
 Start of active frames in mfc_buf.
 
frame_idx_t n_feat_alloc
 Number of frames allocated in feat_buf.
 
frame_idx_t n_feat_frame
 Number of frames active in feat_buf.
 
frame_idx_t feat_outidx
 Start of active frames in feat_buf.
 

Detailed Description

Acoustic model structure.

This object encapsulates all stages of acoustic processing, from raw audio input to acoustic score output. The reason for grouping all of these modules together is that they all have to "agree" in their parameterizations, and the configuration of the acoustic and dynamic feature computation is completely dependent on the parameters used to build the original acoustic model (which should by now always be specified in a feat.params file).

Because there is not a one-to-one correspondence from blocks of input audio or frames of input features to frames of acoustic scores (due to dynamic feature calculation), results may not be immediately available after input, and the output results will not correspond to the last piece of data input.

TODO: In addition, this structure serves the purpose of queueing frames of features (and potentially also scores in the future) for asynchronous passes of recognition operating in parallel.

Definition at line 148 of file acmod.h.

Field Documentation

◆ config

cmd_ln_t* acmod_s::config

Configuration.

Definition at line 150 of file acmod.h.

Referenced by acmod_free(), acmod_init(), and acmod_set_insenfh().

◆ fcb

feat_t* acmod_s::fcb

Dynamic feature computation.

Definition at line 156 of file acmod.h.

Referenced by acmod_free(), and ps_get_feat().

◆ fe

fe_t* acmod_s::fe

Acoustic feature computation.

Definition at line 155 of file acmod.h.

Referenced by acmod_end_utt(), acmod_free(), acmod_start_utt(), and ps_get_fe().

◆ feat_buf

mfcc_t*** acmod_s::feat_buf

Temporary buffer of dynamic features.

Definition at line 174 of file acmod.h.

Referenced by acmod_free().

◆ framepos

long* acmod_s::framepos

File positions of recent frames in senone file.

Definition at line 179 of file acmod.h.

Referenced by acmod_free().

◆ grow_feat

uint8 acmod_s::grow_feat

Whether to grow feat_buf.

Definition at line 184 of file acmod.h.

Referenced by acmod_process_feat(), acmod_read_scores(), and acmod_set_grow().

◆ insen_swap

uint8 acmod_s::insen_swap

Whether to swap input senone score.

Definition at line 185 of file acmod.h.

◆ insenfh

FILE* acmod_s::insenfh

Input senone score file.

Definition at line 178 of file acmod.h.

Referenced by acmod_set_insenfh().

◆ lmath

logmath_t* acmod_s::lmath

Log-math computation.

Definition at line 151 of file acmod.h.

Referenced by acmod_init(), and ps_lattice_init_search().

◆ log_zero

int acmod_s::log_zero

Zero log-probability value.

Definition at line 170 of file acmod.h.

◆ mdef

bin_mdef_t* acmod_s::mdef

Model definition.

Definition at line 159 of file acmod.h.

Referenced by acmod_free(), bin_mdef_read_text(), and ps_add_word().

◆ mfc_buf

mfcc_t** acmod_s::mfc_buf

Temporary buffer of acoustic features.

Definition at line 173 of file acmod.h.

Referenced by acmod_end_utt(), and acmod_free().

◆ mfcfh

FILE* acmod_s::mfcfh

File for writing acoustic feature data.

Definition at line 176 of file acmod.h.

Referenced by acmod_free(), and acmod_set_mfcfh().

◆ mgau

ps_mgau_t* acmod_s::mgau

Model parameters.

Definition at line 161 of file acmod.h.

Referenced by acmod_advance(), acmod_free(), acmod_rewind(), and acmod_start_utt().

◆ mllr

ps_mllr_t* acmod_s::mllr

Speaker transformation.

Definition at line 162 of file acmod.h.

Referenced by acmod_update_mllr().

◆ n_senone_active

int acmod_s::n_senone_active

Number of active GMMs.

Definition at line 169 of file acmod.h.

Referenced by acmod_start_utt().

◆ output_frame

frame_idx_t acmod_s::output_frame

Index of next frame of dynamic features.

Definition at line 187 of file acmod.h.

Referenced by acmod_advance(), acmod_rewind(), acmod_start_utt(), ps_get_n_frames(), and ps_get_utt_time().

◆ rawfh

FILE* acmod_s::rawfh

File for writing raw audio data.

Definition at line 175 of file acmod.h.

Referenced by acmod_free(), and acmod_set_rawfh().

◆ senfh

FILE* acmod_s::senfh

File for writing senone score data.

Definition at line 177 of file acmod.h.

Referenced by acmod_free(), and acmod_set_senfh().

◆ senone_active

uint8* acmod_s::senone_active

Array of deltas to active GMMs.

Definition at line 167 of file acmod.h.

Referenced by acmod_free().

◆ senone_active_vec

bitvec_t* acmod_s::senone_active_vec

Active GMMs in current frame.

Definition at line 166 of file acmod.h.

Referenced by acmod_clear_active(), and acmod_free().

◆ senone_scores

int16* acmod_s::senone_scores

GMM scores for current frame.

Definition at line 165 of file acmod.h.

Referenced by acmod_free().

◆ senscr_frame

int acmod_s::senscr_frame

Frame index for senone_scores.

Definition at line 168 of file acmod.h.

Referenced by acmod_rewind(), and acmod_start_utt().

◆ state

uint8 acmod_s::state

State of utterance processing.

Definition at line 182 of file acmod.h.

Referenced by acmod_end_utt(), acmod_init(), acmod_start_utt(), and ps_process_raw().

◆ strings

glist_t acmod_s::strings

Temporary acoustic model filenames.

Definition at line 152 of file acmod.h.

◆ tmat

tmat_t* acmod_s::tmat

Transition matrices.

Definition at line 160 of file acmod.h.

Referenced by acmod_free().


The documentation for this struct was generated from the following file: