Issue in Decoding

After training, I got this error which is even after validation.
Pre-processing of the test set was also done. But It gave me errors while decoding.
It also computed the acoustic model.

Traceback (most recent call last):
File “DeepSpeech.py”, line 942, in
tf.app.run(main)
File “/usr/local/lib/python3.6/dist-packages/tensorflow/python/platform/app.py”, line 125, in run
_sys.exit(main(argv))
File “DeepSpeech.py”, line 898, in main
test()
File “DeepSpeech.py”, line 659, in test
evaluate.evaluate(test_data, graph)
File “/home/cle-dl-1/DeepSpeech/DeepSpeech-0.4.1/evaluate.py”, line 179, in evaluate
num_processes=num_processes, scorer=scorer)
File “/usr/local/lib/python3.6/dist-packages/ds_ctcdecoder/init.py”, line 102, in ctc_beam_search_decoder_batch
for beam_results in batch_beam_results
File “/usr/local/lib/python3.6/dist-packages/ds_ctcdecoder/init.py”, line 102, in
for beam_results in batch_beam_results
File “/usr/local/lib/python3.6/dist-packages/ds_ctcdecoder/init.py”, line 101, in
[(res.probability, alphabet.decode(res.tokens)) for res in beam_results]
File “/home/cle-dl-1/DeepSpeech/DeepSpeech-0.4.1/util/text.py”, line 50, in decode
res += self.string_from_label(label)
File “/home/cle-dl-1/DeepSpeech/DeepSpeech-0.4.1/util/text.py”, line 29, in string_from_label
return self._label_to_str[label]
IndexError: list index out of range

This is mismatching alphabet file: some of your data contains characters not in your alphabet file.

Okay. Thank you! It has been resolved. But the problem now is, it doesn’t give me any output in decoding. I trained on almost 100 hours of data and longest transcription it has is almost 12 seconds.
I got the model, things work fine but it always giving me the blank result. Why is it so ?

There could a lot of reasons, without more details on your training setup it’s hard to tell anything …

@noor_e_emaan11 i am getting the same error can you tell me how did your problem resolved
i did not find any character in dataset which is not in alphabet,

Check your flags.py, alphabet.txt file, put all the characters from train, test and dev even they are replicating.
This error occured randomly with me. I couldn’t specify one reason for it.
try with next iteration after checking flag.py, hopefully, It will resolve.

1 Like

THANKS… my problem is solved, there was no ’ character in my alphabet.txt.

1 Like