49 #include <sphinxbase/prim_type.h> 50 #include <sphinxbase/err.h> 51 #include <sphinxbase/cmd_ln.h> 52 #include <sphinxbase/strfuncs.h> 53 #include <sphinxbase/byteorder.h> 54 #include <sphinxbase/feat.h> 55 #include <sphinxbase/bio.h> 58 #include "cmdln_macro.h" 60 #include "s2_semi_mgau.h" 65 static const arg_t feat_defn[] = {
66 waveform_to_cepstral_command_line_macro(),
67 cepstral_to_feature_command_line_macro(),
71 #ifndef WORDS_BIGENDIAN 72 #define WORDS_BIGENDIAN 1 75 static int32 acmod_process_mfcbuf(
acmod_t *acmod);
80 char const *mdeffn, *tmatfn, *mllrfn, *hmmdir;
83 if ((mdeffn = cmd_ln_str_r(acmod->
config,
"-mdef")) == NULL) {
84 if ((hmmdir = cmd_ln_str_r(acmod->
config,
"-hmm")) == NULL) {
85 E_ERROR(
"Acoustic model definition is not specified neither with -mdef option nor with -hmm\n");
87 E_ERROR(
"Folder '%s' does not contain acoustic model definition 'mdef'\n", hmmdir);
93 E_ERROR(
"Failed to read acoustic model definition from %s\n", mdeffn);
98 if ((tmatfn = cmd_ln_str_r(acmod->
config,
"-tmat")) == NULL) {
99 E_ERROR(
"No tmat file specified\n");
103 cmd_ln_float32_r(acmod->
config,
"-tmatfloor"),
107 if ((cmd_ln_str_r(acmod->
config,
"-mean") == NULL)
108 || (cmd_ln_str_r(acmod->
config,
"-var") == NULL)
109 || (cmd_ln_str_r(acmod->
config,
"-tmat") == NULL)) {
110 E_ERROR(
"No mean/var/tmat files specified\n");
114 if (cmd_ln_str_r(acmod->
config,
"-senmgau")) {
115 E_INFO(
"Using general multi-stream GMM computation\n");
116 acmod->
mgau = ms_mgau_init(acmod, acmod->
lmath, acmod->
mdef);
117 if (acmod->
mgau == NULL)
121 E_INFO(
"Attempting to use SCHMM computation module\n");
122 if ((acmod->
mgau = s2_semi_mgau_init(acmod)) == NULL) {
123 E_INFO(
"Attempting to use PTHMM computation module\n");
124 if ((acmod->
mgau = ptm_mgau_init(acmod, acmod->
mdef)) == NULL) {
125 E_INFO(
"Falling back to general multi-stream GMM computation\n");
126 acmod->
mgau = ms_mgau_init(acmod, acmod->
lmath, acmod->
mdef);
127 if (acmod->
mgau == NULL)
134 if ((mllrfn = cmd_ln_str_r(acmod->
config,
"-mllr"))) {
145 acmod_init_feat(
acmod_t *acmod)
148 feat_init(cmd_ln_str_r(acmod->
config,
"-feat"),
149 cmn_type_from_str(cmd_ln_str_r(acmod->
config,
"-cmn")),
150 cmd_ln_boolean_r(acmod->
config,
"-varnorm"),
151 agc_type_from_str(cmd_ln_str_r(acmod->
config,
"-agc")),
152 1, cmd_ln_int32_r(acmod->
config,
"-ceplen"));
153 if (acmod->
fcb == NULL)
156 if (cmd_ln_str_r(acmod->
config,
"-lda")) {
157 E_INFO(
"Reading linear feature transformation from %s\n",
158 cmd_ln_str_r(acmod->
config,
"-lda"));
159 if (feat_read_lda(acmod->
fcb,
160 cmd_ln_str_r(acmod->
config,
"-lda"),
161 cmd_ln_int32_r(acmod->
config,
"-ldadim")) < 0)
165 if (cmd_ln_str_r(acmod->
config,
"-svspec")) {
167 E_INFO(
"Using subvector specification %s\n",
168 cmd_ln_str_r(acmod->
config,
"-svspec"));
169 if ((subvecs = parse_subvecs(cmd_ln_str_r(acmod->
config,
"-svspec"))) == NULL)
171 if ((feat_set_subvecs(acmod->
fcb, subvecs)) < 0)
175 if (cmd_ln_exists_r(acmod->
config,
"-agcthresh")
176 && 0 != strcmp(cmd_ln_str_r(acmod->
config,
"-agc"),
"none")) {
177 agc_set_threshold(acmod->
fcb->agc_struct,
178 cmd_ln_float32_r(acmod->
config,
"-agcthresh"));
181 if (acmod->
fcb->cmn_struct
182 && cmd_ln_exists_r(acmod->
config,
"-cmninit")) {
183 char *c, *cc, *vallist;
186 vallist = ckd_salloc(cmd_ln_str_r(acmod->
config,
"-cmninit"));
189 while (nvals < acmod->fcb->cmn_struct->veclen
190 && (cc = strchr(c,
',')) != NULL) {
192 acmod->
fcb->cmn_struct->cmn_mean[nvals] = FLOAT2MFCC(atof(c));
196 if (nvals < acmod->fcb->cmn_struct->veclen && *c !=
'\0') {
197 acmod->
fcb->cmn_struct->cmn_mean[nvals] = FLOAT2MFCC(atof(c));
205 acmod_fe_mismatch(
acmod_t *acmod, fe_t *fe)
208 if (cmd_ln_int32_r(acmod->
config,
"-ceplen") != fe_get_output_size(fe)) {
209 E_ERROR(
"Configured feature length %d doesn't match feature extraction output size %d\n",
210 cmd_ln_int32_r(acmod->
config,
"-ceplen"),
211 fe_get_output_size(fe));
220 acmod_feat_mismatch(
acmod_t *acmod, feat_t *fcb)
223 if (0 != strcmp(cmd_ln_str_r(acmod->
config,
"-feat"), feat_name(fcb)))
226 if (cmd_ln_int32_r(acmod->
config,
"-ceplen") != feat_cepsize(fcb))
233 acmod_init(cmd_ln_t *config, logmath_t *lmath, fe_t *fe, feat_t *fcb)
236 char const *featparams;
238 acmod = ckd_calloc(1,
sizeof(*acmod));
239 acmod->
config = cmd_ln_retain(config);
240 acmod->
lmath = lmath;
244 if ((featparams = cmd_ln_str_r(acmod->
config,
"-featparams"))) {
245 if (cmd_ln_parse_file_r(acmod->
config, feat_defn, featparams, FALSE) != NULL) {
246 E_INFO(
"Parsed model-specific feature parameters from %s\n", featparams);
252 if (acmod_fe_mismatch(acmod, fe))
259 acmod->
fe = fe_init_auto_r(config);
260 if (acmod->
fe == NULL)
262 if (acmod_fe_mismatch(acmod, acmod->
fe))
266 if (acmod_feat_mismatch(acmod, fcb))
273 if (acmod_init_feat(acmod) < 0)
278 if (acmod_init_am(acmod) < 0)
301 acmod->
compallsen = cmd_ln_boolean_r(config,
"-compallsen");
315 feat_free(acmod->
fcb);
317 cmd_ln_free_r(acmod->
config);
320 ckd_free_2d((
void **)acmod->
mfc_buf);
325 fclose(acmod->
mfcfh);
327 fclose(acmod->
rawfh);
329 fclose(acmod->
senfh);
341 ps_mgau_free(acmod->
mgau);
354 ps_mgau_transform(acmod->
mgau, mllr);
362 char nsenstr[64], logbasestr[64];
364 sprintf(nsenstr,
"%d", bin_mdef_n_sen(acmod->
mdef));
365 sprintf(logbasestr,
"%f", logmath_get_base(acmod->
lmath));
366 return bio_writehdr(logfh,
368 "mdef_file", cmd_ln_str_r(acmod->
config,
"-mdef"),
370 "logbase", logbasestr, NULL);
377 fclose(acmod->
senfh);
378 acmod->
senfh = logfh;
390 fclose(acmod->
mfcfh);
391 acmod->
mfcfh = logfh;
392 fwrite(&rv, 4, 1, acmod->
mfcfh);
400 fclose(acmod->
rawfh);
401 acmod->
rawfh = logfh;
406 acmod_grow_feat_buf(
acmod_t *acmod,
int nfr)
409 E_FATAL(
"Decoder can not process more than %d frames at once, requested %d\n",
426 acmod_grow_feat_buf(acmod, 128);
434 fe_start_utt(acmod->
fe);
458 fe_end_utt(acmod->
fe, acmod->
mfc_buf[inptr], &nfr);
462 nfr = acmod_process_mfcbuf(acmod);
466 outlen = (int32) ((FTELL(acmod->
mfcfh) - 4) / 4);
467 if (!WORDS_BIGENDIAN)
470 if ((rv = FSEEK(acmod->
mfcfh, 0, SEEK_SET)) == 0) {
471 fwrite(&outlen, 4, 1, acmod->
mfcfh);
473 fclose(acmod->
mfcfh);
477 fclose(acmod->
rawfh);
482 fclose(acmod->
senfh);
491 mfcc_t **cep,
int n_frames)
494 int32 *ptr = (int32 *)cep[0];
496 n = n_frames * feat_cepsize(acmod->
fcb);
498 if (!WORDS_BIGENDIAN) {
499 for (i = 0; i < (n *
sizeof(mfcc_t)); ++i) {
504 if (fwrite(cep[0],
sizeof(mfcc_t), n, acmod->
mfcfh) != n) {
505 E_ERROR_SYSTEM(
"Failed to write %d values to log file", n);
509 if (!WORDS_BIGENDIAN) {
510 for (i = 0; i < (n *
sizeof(mfcc_t)); ++i) {
518 acmod_process_full_cep(
acmod_t *acmod,
526 acmod_log_mfc(acmod, *inout_cep, *inout_n_frames);
532 E_FATAL(
"Batch processing can not process more than %d frames at once, requested %d\n",
536 acmod->
feat_buf = feat_array_alloc(acmod->
fcb, *inout_n_frames);
542 nfr = feat_s2mfc2feat_live(acmod->
fcb, *inout_cep, inout_n_frames,
546 *inout_cep += *inout_n_frames;
552 acmod_process_full_raw(
acmod_t *acmod,
553 int16
const **inout_raw,
554 size_t *inout_n_samps)
561 fwrite(*inout_raw, 2, *inout_n_samps, acmod->
rawfh);
563 if (fe_process_frames(acmod->
fe, NULL, inout_n_samps, NULL, &nfr) < 0)
567 acmod->
mfc_buf = ckd_calloc_2d(nfr + 1, fe_get_output_size(acmod->
fe),
573 fe_start_utt(acmod->
fe);
574 if (fe_process_frames(acmod->
fe, inout_raw, inout_n_samps,
577 fe_end_utt(acmod->
fe, acmod->
mfc_buf[nfr], &ntail);
581 nfr = acmod_process_full_cep(acmod, &cepptr, &nfr);
590 acmod_process_mfcbuf(
acmod_t *acmod)
599 int saved_state = acmod->
state;
612 acmod->
state = saved_state;
624 int16
const **inout_raw,
625 size_t *inout_n_samps,
632 return acmod_process_full_raw(acmod, inout_raw, inout_n_samps);
636 if (inout_n_samps && *inout_n_samps) {
637 int16
const *prev_audio_inptr = *inout_raw;
648 if (fe_process_frames(acmod->
fe, inout_raw, inout_n_samps,
649 acmod->
mfc_buf + inptr, &ncep1) < 0)
653 fwrite(prev_audio_inptr, 2,
654 *inout_raw - prev_audio_inptr,
656 prev_audio_inptr = *inout_raw;
672 assert(inptr + ncep <= acmod->n_mfc_alloc);
673 if (fe_process_frames(acmod->
fe, inout_raw, inout_n_samps,
674 acmod->
mfc_buf + inptr, &ncep) < 0)
678 fwrite(prev_audio_inptr, 2,
679 *inout_raw - prev_audio_inptr, acmod->
rawfh);
680 prev_audio_inptr = *inout_raw;
688 return acmod_process_mfcbuf(acmod);
697 int32 nfeat, ncep, inptr;
702 return acmod_process_full_cep(acmod, inout_cep, inout_n_frames);
706 acmod_log_mfc(acmod, *inout_cep, *inout_n_frames);
709 orig_n_frames = ncep = nfeat = *inout_n_frames;
713 nfeat += feat_window_size(acmod->
fcb);
715 nfeat -= feat_window_size(acmod->
fcb);
722 acmod_grow_feat_buf(acmod, acmod->
n_feat_alloc + nfeat);
741 *inout_n_frames -= ncep;
751 nfeat = feat_s2mfc2feat_live(acmod->
fcb, *inout_cep,
764 *inout_n_frames -= ncep1;
769 nfeat = feat_s2mfc2feat_live(acmod->
fcb, *inout_cep,
779 *inout_n_frames -= ncep;
783 return orig_n_frames - *inout_n_frames;
808 for (i = 0; i < feat_dimension1(acmod->
fcb); ++i)
810 feat[i], feat_dimension2(acmod->
fcb, i) *
sizeof(**feat));
818 acmod_read_senfh_header(
acmod_t *acmod)
824 if (bio_readhdr(acmod->
insenfh, &name, &val, &swap) < 0)
826 for (i = 0; name[i] != NULL; ++i) {
827 if (!strcmp(name[i],
"n_sen")) {
828 if (atoi(val[i]) != bin_mdef_n_sen(acmod->
mdef)) {
829 E_ERROR(
"Number of senones in senone file (%d) does not match mdef (%d)\n",
830 atoi(val[i]), bin_mdef_n_sen(acmod->
mdef));
834 if (!strcmp(name[i],
"logbase")) {
835 if (abs(atof(val[i]) - logmath_get_base(acmod->
lmath)) > 0.001) {
836 E_ERROR(
"Logbase in senone file (%f) does not match acmod (%f)\n",
837 atof(val[i]), logmath_get_base(acmod->
lmath));
843 bio_hdrarg_free(name, val);
846 bio_hdrarg_free(name, val);
860 return acmod_read_senfh_header(acmod);
868 E_ERROR(
"Circular feature buffer cannot be rewound (output frame %d, alloc %d)\n",
899 int16
const *senscr, FILE *senfh)
914 n_active2 = n_active;
915 if (fwrite(&n_active2, 2, 1, senfh) != 1)
917 if (n_active == bin_mdef_n_sen(acmod->
mdef)) {
918 if (fwrite(senscr, 2, n_active, senfh) != n_active)
923 if (fwrite(active, 1, n_active, senfh) != n_active)
925 for (i = n = 0; i < n_active; ++i) {
927 if (fwrite(senscr + n, 2, 1, senfh) != 1)
933 E_ERROR_SYSTEM(
"Failed to write frame to senone file");
941 acmod_read_scores_internal(
acmod_t *acmod)
956 if ((rv = fread(&n_active, 2, 1, senfh)) < 0)
978 for (j = n + 1; j < sen; ++j)
980 if ((rv = fread(acmod->
senone_scores + sen, 2, 1, senfh)) < 0)
987 while (n < bin_mdef_n_sen(acmod->
mdef))
992 E_ERROR_SYSTEM(
"Failed to read frame from senone file");
1013 if ((rv = acmod_read_scores_internal(acmod)) != 1)
1020 E_DEBUG(1,(
"Frame %d has %d active states\n",
1033 calc_frame_idx(
acmod_t *acmod,
int *inout_frame_idx)
1038 if (inout_frame_idx == NULL)
1040 else if (*inout_frame_idx < 0)
1041 frame_idx = acmod->
output_frame + 1 + *inout_frame_idx;
1043 frame_idx = *inout_frame_idx;
1049 calc_feat_idx(
acmod_t *acmod,
int frame_idx)
1051 int n_backfr, feat_idx;
1054 if (frame_idx < 0 || acmod->output_frame - frame_idx > n_backfr) {
1055 E_ERROR(
"Frame %d outside queue of %d frames, %d alloc (%d > %d), cannot score\n",
1072 int frame_idx, feat_idx;
1075 frame_idx = calc_frame_idx(acmod, inout_frame_idx);
1078 if ((feat_idx = calc_feat_idx(acmod, frame_idx)) < 0)
1081 if (inout_frame_idx)
1082 *inout_frame_idx = frame_idx;
1090 int frame_idx, feat_idx;
1093 frame_idx = calc_frame_idx(acmod, inout_frame_idx);
1099 if (inout_frame_idx)
1100 *inout_frame_idx = frame_idx;
1105 if ((feat_idx = calc_feat_idx(acmod, frame_idx)) < 0)
1111 if (acmod_read_scores_internal(acmod) < 0)
1119 ps_mgau_frame_eval(acmod->
mgau,
1128 if (inout_frame_idx)
1129 *inout_frame_idx = frame_idx;
1139 E_DEBUG(1,(
"Frame %d has %d active states\n", frame_idx, acmod->
n_senone_active));
1152 for (i = 0; i < bin_mdef_n_sen(acmod->
mdef); ++i) {
1155 *out_best_senid = i;
1164 if (*senscr < best) {
1166 *out_best_senid = i;
1183 #define MPX_BITVEC_SET(a,h,i) \ 1184 if (hmm_mpx_ssid(h,i) != BAD_SSID) \ 1185 bitvec_set((a)->senone_active_vec, hmm_mpx_senid(h,i)) 1186 #define NONMPX_BITVEC_SET(a,h,i) \ 1187 bitvec_set((a)->senone_active_vec, \ 1188 hmm_nonmpx_senid(h,i)) 1197 if (hmm_is_mpx(hmm)) {
1198 switch (hmm_n_emit_state(hmm)) {
1200 MPX_BITVEC_SET(acmod, hmm, 4);
1201 MPX_BITVEC_SET(acmod, hmm, 3);
1203 MPX_BITVEC_SET(acmod, hmm, 2);
1204 MPX_BITVEC_SET(acmod, hmm, 1);
1205 MPX_BITVEC_SET(acmod, hmm, 0);
1208 for (i = 0; i < hmm_n_emit_state(hmm); ++i) {
1209 MPX_BITVEC_SET(acmod, hmm, i);
1214 switch (hmm_n_emit_state(hmm)) {
1216 NONMPX_BITVEC_SET(acmod, hmm, 4);
1217 NONMPX_BITVEC_SET(acmod, hmm, 3);
1219 NONMPX_BITVEC_SET(acmod, hmm, 2);
1220 NONMPX_BITVEC_SET(acmod, hmm, 1);
1221 NONMPX_BITVEC_SET(acmod, hmm, 0);
1224 for (i = 0; i < hmm_n_emit_state(hmm); ++i) {
1225 NONMPX_BITVEC_SET(acmod, hmm, i);
1234 int32 w, l, n,
b, total_dists, total_words, extra_bits;
1237 total_dists = bin_mdef_n_sen(acmod->
mdef);
1242 total_words = total_dists / BITVEC_BITS;
1243 extra_bits = total_dists % BITVEC_BITS;
1248 for (b = 0; b < BITVEC_BITS; ++
b) {
1249 if (*flagptr & (1UL << b)) {
1250 int32 sen = w * BITVEC_BITS +
b;
1251 int32 delta = sen - l;
1254 while (delta > 255) {
1264 for (b = 0; b < extra_bits; ++
b) {
1265 if (*flagptr & (1UL << b)) {
1266 int32 sen = w * BITVEC_BITS +
b;
1267 int32 delta = sen - l;
1270 while (delta > 255) {
1280 E_DEBUG(1, (
"acmod_flags2list: %d active in frame %d\n",
(Sphinx 3.0 specific) A module that wraps up the code of gauden and senone because they are closely r...
FILE * insenfh
Input senone score file.
uint8 grow_feat
Whether to grow feat_buf.
ps_mgau_t * mgau
Model parameters.
int acmod_read_scores(acmod_t *acmod)
Read one frame of scores from senone score dump file.
uint8 * senone_active
Array of deltas to active GMMs.
long * framepos
File positions of recent frames in senone file.
Utterance started, no data yet.
int acmod_set_insenfh(acmod_t *acmod, FILE *senfh)
Set up a senone score dump file for input.
int acmod_rewind(acmod_t *acmod)
Rewind the current utterance, allowing it to be rescored.
int16 * senone_scores
GMM scores for current frame.
ps_mllr_t * acmod_update_mllr(acmod_t *acmod, ps_mllr_t *mllr)
Adapt acoustic model using a linear transform.
int acmod_process_cep(acmod_t *acmod, mfcc_t ***inout_cep, int *inout_n_frames, int full_utt)
Feed acoustic feature data into the acoustic model for scoring.
int n_senone_active
Number of active GMMs.
An individual HMM among the HMM search space.
logmath_t * lmath
Log-math computation.
fe_t * fe
Acoustic feature computation.
frame_idx_t n_mfc_frame
Number of frames active in mfc_buf.
void acmod_activate_hmm(acmod_t *acmod, hmm_t *hmm)
Activate senones associated with an HMM.
Utterance ended, still buffering.
float32 *** b
Bias part of mean transformations.
FILE * rawfh
File for writing raw audio data.
mfcc_t ** mfc_buf
Temporary buffer of acoustic features.
void tmat_free(tmat_t *t)
RAH, add code to remove memory allocated by tmat_init.
frame_idx_t n_feat_alloc
Number of frames allocated in feat_buf.
mfcc_t *** feat_buf
Temporary buffer of dynamic features.
tmat_t * tmat_init(char const *tmatfile, logmath_t *lmath, float64 tpfloor, int32 breport)
Initialize transition matrix.
int acmod_set_senfh(acmod_t *acmod, FILE *logfh)
Start logging senone scores to a filehandle.
#define MAX_N_FRAMES
Maximum number of frames in index, should be in sync with above.
int acmod_set_rawfh(acmod_t *acmod, FILE *logfh)
Start logging raw audio to a filehandle.
ps_mllr_t * mllr
Speaker transformation.
Fast phonetically-tied mixture evaluation.
POCKETSPHINX_EXPORT ps_mllr_t * ps_mllr_read(char const *file)
Read a speaker-adaptive linear transform from a file.
uint8 compallsen
Compute all senones?
POCKETSPHINX_EXPORT bin_mdef_t * bin_mdef_read(cmd_ln_t *config, const char *filename)
Read a binary mdef from a file.
int acmod_process_feat(acmod_t *acmod, mfcc_t **feat)
Feed dynamic feature data into the acoustic model for scoring.
int acmod_write_senfh_header(acmod_t *acmod, FILE *logfh)
Write senone dump file header.
cmd_ln_t * config
Configuration.
frame_idx_t output_frame
Index of next frame of dynamic features.
int acmod_write_scores(acmod_t *acmod, int n_active, uint8 const *active, int16 const *senscr, FILE *senfh)
Write a frame of senone scores to a dump file.
tmat_t * tmat
Transition matrices.
int32 acmod_flags2list(acmod_t *acmod)
Build active list from.
POCKETSPHINX_EXPORT int ps_mllr_free(ps_mllr_t *mllr)
Release a pointer to a linear transform.
int acmod_end_utt(acmod_t *acmod)
Mark the end of an utterance.
int acmod_advance(acmod_t *acmod)
Advance the frame index.
uint8 state
State of utterance processing.
int acmod_set_mfcfh(acmod_t *acmod, FILE *logfh)
Start logging MFCCs to a filehandle.
void acmod_free(acmod_t *acmod)
Finalize an acoustic model.
void acmod_clear_active(acmod_t *acmod)
Clear set of active senones.
#define SENSCR_DUMMY
Dummy senone score value for unintentionally active states.
Feature space linear transform structure.
frame_idx_t feat_outidx
Start of active frames in feat_buf.
mfcc_t ** acmod_get_frame(acmod_t *acmod, int *inout_frame_idx)
Get a frame of dynamic feature data.
feat_t * fcb
Dynamic feature computation.
int log_zero
Zero log-probability value.
FILE * senfh
File for writing senone score data.
frame_idx_t mfc_outidx
Start of active frames in mfc_buf.
frame_idx_t n_mfc_alloc
Number of frames allocated in mfc_buf.
int acmod_process_raw(acmod_t *acmod, int16 const **inout_raw, size_t *inout_n_samps, int full_utt)
TODO: Set queue length for utterance processing.
int bin_mdef_free(bin_mdef_t *m)
Release a pointer to a binary mdef.
uint8 insen_swap
Whether to swap input senone score.
int acmod_start_utt(acmod_t *acmod)
Mark the start of an utterance.
int senscr_frame
Frame index for senone_scores.
bin_mdef_t * mdef
Model definition.
int acmod_best_score(acmod_t *acmod, int *out_best_senid)
Get best score and senone index for current frame.
acmod_t * acmod_init(cmd_ln_t *config, logmath_t *lmath, fe_t *fe, feat_t *fcb)
Initialize an acoustic model.
frame_idx_t n_feat_frame
Number of frames active in feat_buf.
Acoustic model structures for PocketSphinx.
FILE * mfcfh
File for writing acoustic feature data.
Acoustic model structure.
int acmod_set_grow(acmod_t *acmod, int grow_feat)
Set memory allocation policy for utterance processing.
int16 const * acmod_score(acmod_t *acmod, int *inout_frame_idx)
Score one frame of data.
int frame_idx
frame counter.
bitvec_t * senone_active_vec
Active GMMs in current frame.