Spaces:
Running
Running
Commit
•
963440b
1
Parent(s):
66cbb93
Update evaluate_asr.py
Browse files- evaluate_asr.py +1 -1
evaluate_asr.py
CHANGED
@@ -20,7 +20,7 @@ def evaluate_model(ds, pipe, wer_metric):
|
|
20 |
audio_sample = sample["audio"]
|
21 |
transcription = pipe(audio_sample["array"])['text']
|
22 |
# Keep only letter and spaces for evaluation
|
23 |
-
transcription = "".
|
24 |
wer = wer_metric.compute(predictions=[transcription.upper()], references=[sample["text"].upper()])
|
25 |
wer_scores.append(wer)
|
26 |
wer_results.append({
|
|
|
20 |
audio_sample = sample["audio"]
|
21 |
transcription = pipe(audio_sample["array"])['text']
|
22 |
# Keep only letter and spaces for evaluation
|
23 |
+
transcription = transcription.replace(",", "").replace(".", "").replace("!", "").replace("?", "")
|
24 |
wer = wer_metric.compute(predictions=[transcription.upper()], references=[sample["text"].upper()])
|
25 |
wer_scores.append(wer)
|
26 |
wer_results.append({
|