Skip to content

Commit

Permalink
Merge pull request #189 from PingqiLi/main
Browse files Browse the repository at this point in the history
Fix a bug in the validation script of the conformer
  • Loading branch information
Ash-Lee233 authored Jul 11, 2024
2 parents 21f7422 + 11b82a3 commit 8c8cc12
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/conformer/predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,9 @@ def main():
ground_truth_list.append(character)
logger.info("Labs (%d/%d): %s %s", count, tot_sample, uttid, ground_truth)
logger.info("Hyps (%d/%d): %s %s", count, tot_sample, uttid, content)
cer = wer(content_list, ground_truth_list)
if not content_list:
raise ValueError("The Hypothesis utterance should not be empty")
cer = wer(ground_truth_list, content_list)
logger.info("cer : %.3f", cer)
result_file.write("{} {}\n".format(uttid, content))
result_file.flush()
Expand Down

0 comments on commit 8c8cc12

Please sign in to comment.