Add endpointing (#54)

This commit is contained in:
Fangjun Kuang
2023-02-22 15:35:55 +08:00
committed by GitHub
parent 1c6f79f096
commit 124384369a
23 changed files with 2190 additions and 21 deletions

View File

@@ -113,6 +113,9 @@ void OnlineTransducerGreedySearchDecoder::Decode(
if (y != 0) {
emitted = true;
(*result)[i].tokens.push_back(y);
(*result)[i].num_trailing_blanks = 0;
} else {
++(*result)[i].num_trailing_blanks;
}
}
if (emitted) {