Skip to content

Commit

Permalink
fix endpointing
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj committed May 30, 2024
1 parent 702d6d7 commit a7855cc
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,15 @@ static void DecodeOne(const float *encoder_out, int32_t num_rows,
emitted = true;
r.tokens.push_back(y);
r.timestamps.push_back(t + r.frame_offset);
r.num_trailing_blanks = 0;

decoder_input = BuildDecoderInput(y, model->Allocator());

// last decoder state becomes the current state for the first chunk
decoder_output_pair = model->RunDecoder(
std::move(decoder_input), std::move(decoder_output_pair.second));
} else {
++r.num_trailing_blanks;
}
}

Expand Down

0 comments on commit a7855cc

Please sign in to comment.