Steveeeeeeen commited on
Commit
f0f7172
1 Parent(s): 0f94bf5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -31,7 +31,7 @@ def compute_wer_table(audio, text):
31
  for model in model_name:
32
  pipe = pipeline("automatic-speech-recognition", model=model_name[model])
33
  transcription = pipe(audio_input)['text']
34
- # transcription = transcription.replace(",", "").replace(".", "")
35
  trans.append(transcription)
36
  wer = wer_metric.compute(predictions=[transcription.upper()], references=[text.upper()])
37
  wer_scores.append(wer)
 
31
  for model in model_name:
32
  pipe = pipeline("automatic-speech-recognition", model=model_name[model])
33
  transcription = pipe(audio_input)['text']
34
+ transcription = "".join([char for char in transcription if char.isalpha() or char.isspace()])
35
  trans.append(transcription)
36
  wer = wer_metric.compute(predictions=[transcription.upper()], references=[text.upper()])
37
  wer_scores.append(wer)