a bug in ctc beam search decoder
Created by: kiddding
https://github.com/PaddlePaddle/DeepSpeech/blob/edaed68f33b7fff2455c26b880340ba680621f5c/decoders/swig/decoder_utils.cpp
The bug locates in line 30. It happens if you use cutoff_top_n but not cutoff_prob to prune log_probs of vocabulary.
A correct version should be like this:
prob_idx = std::vector<std::pair<int, double>>( prob_idx.begin(), prob_idx.begin() + (cutoff_top_n<cutoff_len)?cutoff_top_n:cutoff_len);
@kuke