From a04e70f1ce696a163d5791134259a05d1275aabc Mon Sep 17 00:00:00 2001 From: root Date: Fri, 5 Jul 2024 03:17:01 +0000 Subject: [PATCH] fix decoding issue --- egs/multi_zh-hans/ASR/zipformer/ctc_decode.py | 2 +- egs/multi_zh-hans/ASR/zipformer/decode.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/egs/multi_zh-hans/ASR/zipformer/ctc_decode.py b/egs/multi_zh-hans/ASR/zipformer/ctc_decode.py index dfe3a5ebd..3b78b4880 100755 --- a/egs/multi_zh-hans/ASR/zipformer/ctc_decode.py +++ b/egs/multi_zh-hans/ASR/zipformer/ctc_decode.py @@ -378,7 +378,7 @@ def decode_dataset( for cut_id, hyp_words, ref_text in zip(cut_ids, hyps, texts): ref_text = normalize_text_alimeeting(ref_text) ref_words = ref_text.split() - hyp_words = list("".join(hyp_words)) + hyp_words = "".join(hyp_words) this_batch.append((cut_id, ref_words, hyp_words)) results[name].extend(this_batch) diff --git a/egs/multi_zh-hans/ASR/zipformer/decode.py b/egs/multi_zh-hans/ASR/zipformer/decode.py index 347c65173..88a46d30c 100755 --- a/egs/multi_zh-hans/ASR/zipformer/decode.py +++ b/egs/multi_zh-hans/ASR/zipformer/decode.py @@ -532,7 +532,6 @@ def decode_dataset( results = defaultdict(list) for batch_idx, batch in enumerate(dl): texts = batch["supervisions"]["text"] - texts = [list(str(text).replace(" ", "")) for text in texts] cut_ids = [cut.id for cut in batch["supervisions"]["cut"]] hyps_dict = decode_one_batch(