Calculate Word Error Rate
https://github.com/jitsi/jiwer
pip install jiwer
from jiwer import wer
reference = "hello world"
hypothesis = "hello duck"
error = wer(reference, hypothesis)
hyps = [item["prediction"] for item in results]
refs = [item["transcription"] for item in results]
error = wer(refs, hyps)
from jiwer import compute_measures
compute_measures(refs, hyps)
[!important]
compute_measures(refs, hyps)
refs
和hyps
順序要對