import jiwer p = open('pred.txt','r',encoding="utf-8") l = open('label.txt','r',encoding="utf-8") pred = p.readline().split('=')[1] label = l.readline().split('=')[1] wer = jiwer.wer(label, pred) print(f'{wer=}') pred = pred.replace(' ', '') label = label.replace(' ', '') cer = jiwer.cer(label, pred) print(f'{cer=}')