File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -324,7 +324,7 @@ def run_asr_wer(args):
324324 punctuation_all = punctuation + string .punctuation
325325 wer_results = []
326326
327- from jiwer import compute_measures
327+ from jiwer import process_words
328328
329329 for gen_wav , prompt_wav , truth in tqdm (test_set ):
330330 if lang == "zh" :
@@ -354,13 +354,13 @@ def run_asr_wer(args):
354354 truth = truth .lower ()
355355 hypo = hypo .lower ()
356356
357- measures = compute_measures (truth , hypo )
358- wer = measures [ " wer" ]
357+ measures = process_words (truth , hypo )
358+ wer = measures . wer
359359
360360 # ref_list = truth.split(" ")
361- # subs = measures[" substitutions"] / len(ref_list)
362- # dele = measures[" deletions"] / len(ref_list)
363- # inse = measures[" insertions"] / len(ref_list)
361+ # subs = measures. substitutions / len(ref_list)
362+ # dele = measures. deletions / len(ref_list)
363+ # inse = measures. insertions / len(ref_list)
364364
365365 wer_results .append (
366366 {
You can’t perform that action at this time.
0 commit comments