Spaces:
Runtime error
Runtime error
Upload app.py
Browse files
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
|
| 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 |
|