From 8301faeb12c16c670a32edbd2dabaa6d04cd1c7f Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Mon, 16 May 2022 22:31:36 +0800 Subject: [PATCH] Fix an error. --- .../ASR/pruned_transducer_stateless2/beam_search.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/egs/librispeech/ASR/pruned_transducer_stateless2/beam_search.py b/egs/librispeech/ASR/pruned_transducer_stateless2/beam_search.py index 8b2570ee4..61a0e74b3 100644 --- a/egs/librispeech/ASR/pruned_transducer_stateless2/beam_search.py +++ b/egs/librispeech/ASR/pruned_transducer_stateless2/beam_search.py @@ -361,9 +361,10 @@ def fast_beam_search_with_nbest_rescoring( oov_word_id = word_table[oov_word] word_ids_list: List[List[int]] = [] + for words in word_list: this_word_ids = [] - for w in words: + for w in words.split(): if w in word_table: this_word_ids.append(word_table[w]) else: