Spaces:
Runtime error
Runtime error
Commit ·
a2618f3
1
Parent(s): 5166d46
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,7 +11,7 @@ def transcribe(audio):
|
|
| 11 |
# time.sleep(3)
|
| 12 |
# load audio and pad/trim it to fit 30 seconds
|
| 13 |
audio = whisper.load_audio(audio)
|
| 14 |
-
|
| 15 |
|
| 16 |
# make log-Mel spectrogram and move to the same device as the transcription_model
|
| 17 |
mel = whisper.log_mel_spectrogram(audio).to(transcription_model.device)
|
|
|
|
| 11 |
# time.sleep(3)
|
| 12 |
# load audio and pad/trim it to fit 30 seconds
|
| 13 |
audio = whisper.load_audio(audio)
|
| 14 |
+
audio = whisper.pad_or_trim(audio)
|
| 15 |
|
| 16 |
# make log-Mel spectrogram and move to the same device as the transcription_model
|
| 17 |
mel = whisper.log_mel_spectrogram(audio).to(transcription_model.device)
|