tensorgirl commited on
Commit
91db312
1 Parent(s): 072d410

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -36,7 +36,7 @@ def English(audio):
36
  transcriber = pipeline("automatic-speech-recognition", model="openai/whisper-base.en")
37
  sr, y = audio
38
  y = y.astype(np.float32)
39
- y = np.max(np.abs(y))
40
 
41
  return transcriber({"sampling_rate": sr, "raw": y})["text"]
42
 
 
36
  transcriber = pipeline("automatic-speech-recognition", model="openai/whisper-base.en")
37
  sr, y = audio
38
  y = y.astype(np.float32)
39
+ y /= np.max(np.abs(y))
40
 
41
  return transcriber({"sampling_rate": sr, "raw": y})["text"]
42