Steven Zheng commited on
Commit
9ec6ab9
1 Parent(s): adae6d0

Corrections on the transcriptions

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 = transcription.replace(",", "").replace(".", "").replace("?", "").replace("!", "")
35
  trans.append(transcription)
36
  wer = wer_metric.compute(predictions=[transcription.upper()], references=[text.upper()])
37
  wer_scores.append(wer)