Unverified Commit e872b4ee authored by Yoach Lacombe's avatar Yoach Lacombe Committed by GitHub
Browse files

Fix WER transcription

parent 62d6bf69
...@@ -52,7 +52,7 @@ def wer(asr_model_name_or_path, prompts, audios, device, per_device_eval_batch_s ...@@ -52,7 +52,7 @@ def wer(asr_model_name_or_path, prompts, audios, device, per_device_eval_batch_s
if len(norm_ref) > 0: if len(norm_ref) > 0:
norm_pred = normalizer(pred["text"]) norm_pred = normalizer(pred["text"])
normalized_predictions.append(norm_pred) normalized_predictions.append(norm_pred)
normalized_references.append(norm_pred) normalized_references.append(norm_ref)
word_error = 100 * metric.compute(predictions=normalized_predictions, references=normalized_references) word_error = 100 * metric.compute(predictions=normalized_predictions, references=normalized_references)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment