diff --git a/src/decoder/lattice-faster-decoder-combine-bucketqueue.cc b/src/decoder/lattice-faster-decoder-combine-bucketqueue.cc index ed53153193a..0ef7c822efd 100644 --- a/src/decoder/lattice-faster-decoder-combine-bucketqueue.cc +++ b/src/decoder/lattice-faster-decoder-combine-bucketqueue.cc @@ -218,7 +218,7 @@ bool LatticeFasterDecoderCombineTpl::GetRawLattice( KALDI_ERR << "You cannot call FinalizeDecoding() and then call " << "GetRawLattice() with use_final_probs == false"; - if (!decoding_finalized_) { + if (!decoding_finalized_ && use_final_probs) { // Process the non-emitting arcs for the unfinished last frame. ProcessNonemitting(); } diff --git a/src/decoder/lattice-faster-decoder-combine.cc b/src/decoder/lattice-faster-decoder-combine.cc index ed53153193a..0ef7c822efd 100644 --- a/src/decoder/lattice-faster-decoder-combine.cc +++ b/src/decoder/lattice-faster-decoder-combine.cc @@ -218,7 +218,7 @@ bool LatticeFasterDecoderCombineTpl::GetRawLattice( KALDI_ERR << "You cannot call FinalizeDecoding() and then call " << "GetRawLattice() with use_final_probs == false"; - if (!decoding_finalized_) { + if (!decoding_finalized_ && use_final_probs) { // Process the non-emitting arcs for the unfinished last frame. ProcessNonemitting(); }