fix decoding issue

This commit is contained in:
root 2024-07-05 03:17:01 +00:00
parent 1d6e80195f
commit a04e70f1ce
2 changed files with 1 additions and 2 deletions

View File

@ -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)

View File

@ -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(