SingleUtteranceNnet3Decoder decoder(...);
...
while (more_data) {
... // decoding of a chunk of audio
if ((num_seconds_decoded - last_lat > lat_freq) && (decoder.NumFramesDecoded() > 0)) {
Lattice rlat;
CompactLattice clat;
bool eou = false;
decoder.Decoder().GetRawLattice(&rlat, eou);
DeterminizeLatticePhonePrunedWrapper(trans_model, &rlat, lat_beam, &clat, det_opts);
if ((lm_fst != NULL) && (big_lm_const_arpa != NULL)) {
CompactLattice rescored_lat;
if (gst_kaldinnet2onlinedecoder_rescore_big_lm(filter, clat, rescored_lat)) { // rescoring function from the GST plug-in code clat = rescored_lat;
}
}
... // following processing
last_lat = num_seconds_decoded;
}
}