mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-09-09 00:54:18 +00:00
Update decode.py
fixed a KeyError occurred during the computation of WER for nbest-oracle
This commit is contained in:
parent
abbd0d92a7
commit
354e40925b
@ -366,7 +366,7 @@ def decode_one_batch(
|
|||||||
ref_texts=supervisions["text"],
|
ref_texts=supervisions["text"],
|
||||||
word_table=word_table,
|
word_table=word_table,
|
||||||
nbest_scale=params.nbest_scale,
|
nbest_scale=params.nbest_scale,
|
||||||
oov="<UNK>",
|
oov="<unk>",
|
||||||
)
|
)
|
||||||
hyps = get_texts(best_path)
|
hyps = get_texts(best_path)
|
||||||
hyps = [[word_table[i] for i in ids] for ids in hyps]
|
hyps = [[word_table[i] for i in ids] for ids in hyps]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user