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_t * | mdef
| Model definition. More...
tmat_t * | tmat
| Transition matrices. More...
ps_mgau_t * | mgau
| Model parameters. More...
ps_mllr_t * | mllr
| 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...
int16 * | rawdata
int32 | rawdata_size
int32 | rawdata_pos
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 | utt_start_frame
| Index of the utterance start in the stream, all timings are relative to that. 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

cmd_ln_t* acmod_s::config

Configuration.

Definition at line 150 of file acmod.h.

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

feat_t* acmod_s::fcb

Dynamic feature computation.

Definition at line 156 of file acmod.h.

Referenced by acmod_end_utt(), acmod_free(), acmod_init(), acmod_process_cep(), acmod_process_feat(), acmod_set_rawfh(), ps_get_feat(), and ptm_mgau_frame_eval().

fe_t* acmod_s::fe

Acoustic feature computation.

Definition at line 155 of file acmod.h.

Referenced by acmod_end_utt(), acmod_free(), acmod_init(), acmod_process_raw(), acmod_start_stream(), acmod_start_utt(), ps_get_fe(), and ps_get_in_speech().

mfcc_t*** acmod_s::feat_buf

Temporary buffer of dynamic features.

Definition at line 174 of file acmod.h.

Referenced by acmod_end_utt(), acmod_free(), acmod_get_frame(), acmod_init(), acmod_process_cep(), acmod_process_feat(), acmod_score(), and acmod_set_rawfh().

long* acmod_s::framepos

File positions of recent frames in senone file.

Definition at line 179 of file acmod.h.

Referenced by acmod_free(), acmod_init(), acmod_read_scores(), acmod_score(), and acmod_set_rawfh().

uint8 acmod_s::grow_feat

Whether to grow feat_buf.

Definition at line 189 of file acmod.h.

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

uint8 acmod_s::insen_swap

Whether to swap input senone score.

Definition at line 190 of file acmod.h.

Referenced by acmod_process_feat().

FILE* acmod_s::insenfh

Input senone score file.

Definition at line 178 of file acmod.h.

Referenced by acmod_process_feat(), acmod_read_scores(), acmod_score(), acmod_set_insenfh(), and acmod_write_scores().

logmath_t* acmod_s::lmath

Log-math computation.

Definition at line 151 of file acmod.h.

Referenced by acmod_init(), acmod_process_feat(), acmod_write_senfh_header(), ps_lattice_init_search(), and ptm_mgau_frame_eval().

int acmod_s::log_zero

Zero log-probability value.

Definition at line 170 of file acmod.h.

Referenced by acmod_init().

bin_mdef_t* acmod_s::mdef

Model definition.

Definition at line 159 of file acmod.h.

Referenced by acmod_best_score(), acmod_clear_active(), acmod_flags2list(), acmod_free(), acmod_init(), acmod_process_feat(), acmod_write_scores(), acmod_write_senfh_header(), ngram_search_init(), ps_add_word(), ps_load_dict(), ps_reinit(), and ptm_mgau_frame_eval().

mfcc_t** acmod_s::mfc_buf

Temporary buffer of acoustic features.

Definition at line 173 of file acmod.h.

Referenced by acmod_end_utt(), acmod_free(), acmod_init(), and acmod_process_raw().

FILE* acmod_s::mfcfh

File for writing acoustic feature data.

Definition at line 176 of file acmod.h.

Referenced by acmod_end_utt(), acmod_free(), acmod_process_cep(), and acmod_set_mfcfh().

ps_mgau_t* acmod_s::mgau

Model parameters.

Definition at line 161 of file acmod.h.

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

ps_mllr_t* acmod_s::mllr

Speaker transformation.

Definition at line 162 of file acmod.h.

Referenced by acmod_free(), and acmod_update_mllr().

int acmod_s::n_senone_active

Number of active GMMs.

Definition at line 169 of file acmod.h.

Referenced by acmod_best_score(), acmod_clear_active(), acmod_flags2list(), acmod_read_scores(), acmod_score(), acmod_start_utt(), and acmod_write_scores().

frame_idx_t acmod_s::output_frame

Index of next frame of dynamic features.

Definition at line 194 of file acmod.h.

Referenced by acmod_advance(), acmod_flags2list(), acmod_read_scores(), acmod_rewind(), acmod_start_utt(), ps_end_utt(), ps_get_n_frames(), ps_get_utt_time(), and ps_start_utt().

FILE* acmod_s::rawfh

File for writing raw audio data.

Definition at line 175 of file acmod.h.

Referenced by acmod_end_utt(), acmod_free(), acmod_process_raw(), and acmod_set_rawfh().

FILE* acmod_s::senfh

File for writing senone score data.

Definition at line 177 of file acmod.h.

Referenced by acmod_end_utt(), acmod_free(), acmod_score(), and acmod_set_senfh().

uint8* acmod_s::senone_active

Array of deltas to active GMMs.

Definition at line 167 of file acmod.h.

Referenced by acmod_best_score(), acmod_flags2list(), acmod_free(), acmod_init(), acmod_score(), and acmod_write_scores().

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(), acmod_flags2list(), acmod_free(), and acmod_init().

int16* acmod_s::senone_scores

GMM scores for current frame.

Definition at line 165 of file acmod.h.

Referenced by acmod_best_score(), acmod_free(), acmod_init(), acmod_score(), and acmod_write_scores().

int acmod_s::senscr_frame

Frame index for senone_scores.

Definition at line 168 of file acmod.h.

Referenced by acmod_read_scores(), acmod_rewind(), acmod_score(), and acmod_start_utt().

uint8 acmod_s::state

State of utterance processing.

Definition at line 187 of file acmod.h.

Referenced by acmod_end_utt(), acmod_init(), acmod_process_cep(), acmod_start_utt(), ps_end_utt(), ps_process_raw(), and ps_start_utt().

glist_t acmod_s::strings

Temporary acoustic model filenames.

Definition at line 152 of file acmod.h.

tmat_t* acmod_s::tmat

Transition matrices.

Definition at line 160 of file acmod.h.

Referenced by acmod_free(), and ngram_search_init().

frame_idx_t acmod_s::utt_start_frame

Index of the utterance start in the stream, all timings are relative to that.

Definition at line 192 of file acmod.h.

Referenced by acmod_init(), acmod_process_raw(), acmod_start_stream(), and acmod_stream_offset().

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

- src/libpocketsphinx/acmod.h