mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-09-18 21:44:18 +00:00
updated
This commit is contained in:
parent
ea87b7dff9
commit
40737f760b
@ -410,10 +410,21 @@ def main():
|
||||
raise ValueError(f"Unsupported decoding method: {params.method}")
|
||||
|
||||
s = "\n"
|
||||
for filename, hyp in zip(params.sound_files, hyps):
|
||||
words = "".join(hyp)
|
||||
words = words.replace("▁", " ").strip()
|
||||
s += f"{filename}:\n{words}\n\n"
|
||||
if params.method == "ctc-decoding":
|
||||
for filename, hyp in zip(params.sound_files, hyps):
|
||||
words = "".join(hyp)
|
||||
words = words.replace("▁", " ").strip()
|
||||
s += f"{filename}:\n{words}\n\n"
|
||||
elif params.method in [
|
||||
"1best",
|
||||
"nbest-rescoring",
|
||||
"whole-lattice-rescoring",
|
||||
]:
|
||||
for filename, hyp in zip(params.sound_files, hyps):
|
||||
for words in hyp:
|
||||
words = " ".join(hyp)
|
||||
words = words.replace("▁", " ").strip()
|
||||
s += f"{filename}:\n{words}\n\n"
|
||||
logging.info(s)
|
||||
|
||||
logging.info("Decoding Done")
|
||||
|
@ -429,10 +429,21 @@ def main():
|
||||
raise ValueError(f"Unsupported decoding method: {params.method}")
|
||||
|
||||
s = "\n"
|
||||
for filename, hyp in zip(params.sound_files, hyps):
|
||||
words = "".join(hyp)
|
||||
words = words.replace("▁", " ").strip()
|
||||
s += f"{filename}:\n{words}\n\n"
|
||||
if params.method == "ctc-decoding":
|
||||
for filename, hyp in zip(params.sound_files, hyps):
|
||||
words = "".join(hyp)
|
||||
words = words.replace("▁", " ").strip()
|
||||
s += f"{filename}:\n{words}\n\n"
|
||||
elif params.method in [
|
||||
"1best",
|
||||
"nbest-rescoring",
|
||||
"whole-lattice-rescoring",
|
||||
]:
|
||||
for filename, hyp in zip(params.sound_files, hyps):
|
||||
for words in hyp:
|
||||
words = " ".join(hyp)
|
||||
words = words.replace("▁", " ").strip()
|
||||
s += f"{filename}:\n{words}\n\n"
|
||||
logging.info(s)
|
||||
|
||||
logging.info("Decoding Done")
|
||||
|
Loading…
x
Reference in New Issue
Block a user