Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -76,9 +76,8 @@ pipe = pipeline("automatic-speech-recognition", model="NbAiLab/nb-whisper-large"
|
|
76 |
|
77 |
@spaces.GPU()
|
78 |
def transcribe_audio(audio_file, batch_size=16):
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
with tempfile.NamedTemporaryFile(suffix=".wav") as temp_audio_file:
|
83 |
# --copy contents of uploaded audio file to temporary file
|
84 |
temp_audio_file.write(open(audio_file, "rb").read())
|
|
|
76 |
|
77 |
@spaces.GPU()
|
78 |
def transcribe_audio(audio_file, batch_size=16):
|
79 |
+
audio_file = convert_to_wav(audio_file)
|
80 |
+
|
|
|
81 |
with tempfile.NamedTemporaryFile(suffix=".wav") as temp_audio_file:
|
82 |
# --copy contents of uploaded audio file to temporary file
|
83 |
temp_audio_file.write(open(audio_file, "rb").read())
|