remove duplicated lines (#988)

This commit is contained in:
Zengwei Yao 2023-04-06 17:47:33 +08:00 committed by GitHub
parent c90f57afdb
commit 136aa94d57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -403,9 +403,8 @@ def main():
text += symbol_table[i] text += symbol_table[i]
return text.replace("", " ").strip() return text.replace("", " ").strip()
context_size = model.context_size
for filename, hyp in zip(args.sound_files, hyps): for filename, hyp in zip(args.sound_files, hyps):
words = token_ids_to_words(hyp[context_size:]) words = token_ids_to_words(hyp)
s += f"{filename}:\n{words}\n" s += f"{filename}:\n{words}\n"
logging.info(s) logging.info(s)