Steveeeeeeen HF staff commited on
Commit
4ad4e5a
1 Parent(s): 963440b

Update demo.md

Browse files
Files changed (1) hide show
  1. demo.md +1 -1
demo.md CHANGED
@@ -51,7 +51,7 @@ def evaluate_model(ds, pipe, wer_metric):
51
  audio_sample = sample["audio"]
52
  transcription = pipe(audio_sample["array"])['text']
53
  # Keep only letter and spaces for evaluation
54
- transcription = "".join([char for char in transcription if char.isalpha() or char.isspace()])
55
  wer = wer_metric.compute(predictions=[transcription.upper()], references=[sample["text"].upper()])
56
  wer_scores.append(wer)
57
  wer_results.append({
 
51
  audio_sample = sample["audio"]
52
  transcription = pipe(audio_sample["array"])['text']
53
  # Keep only letter and spaces for evaluation
54
+ transcription = transcription.replace(",", "").replace(".", "").replace("!", "").replace("?", "")
55
  wer = wer_metric.compute(predictions=[transcription.upper()], references=[sample["text"].upper()])
56
  wer_scores.append(wer)
57
  wer_results.append({