Skip to content

Commit

Permalink
Update offline-ctc-greedy-search-decoder.cc (#917)
Browse files Browse the repository at this point in the history
Bug fixes.
Z_O_O will be decoded as ZO instead of ZOO.
To fix this, prev_id should update every time.
  • Loading branch information
Dadoou authored May 24, 2024
1 parent 86ccb86 commit 4fc0a1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sherpa-onnx/csrc/offline-ctc-greedy-search-decoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ std::vector<OfflineCtcDecoderResult> OfflineCtcGreedySearchDecoder::Decode(
if (y != blank_id_ && y != prev_id) {
r.tokens.push_back(y);
r.timestamps.push_back(t);
prev_id = y;
}
prev_id = y;
} // for (int32_t t = 0; ...)

ans.push_back(std::move(r));
Expand Down

0 comments on commit 4fc0a1d

Please sign in to comment.