Dadoou
Committed by GitHub

Update offline-ctc-greedy-search-decoder.cc (#917)

Bug fixes.
Z_O_O will be decoded as ZO instead of ZOO.
To fix this, prev_id should update every time.
... ... @@ -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));
... ...