Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -318,11 +318,11 @@ def process_audio(audio_input, text_input=''):
|
|
318 |
|
319 |
# Check type - if it is a file we need bytes
|
320 |
#st.write(audio_input)
|
321 |
-
if isinstance(audio_input, str):
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
|
327 |
transcription = client.audio.transcriptions.create(
|
328 |
model="whisper-1",
|
|
|
318 |
|
319 |
# Check type - if it is a file we need bytes
|
320 |
#st.write(audio_input)
|
321 |
+
#if isinstance(audio_input, str):
|
322 |
+
with open(audio_input, "rb") as file:
|
323 |
+
audio_input = file.read()
|
324 |
+
#SaveNewFile=False # file is there and this is just prompt inference
|
325 |
+
#st.write(audio_input)
|
326 |
|
327 |
transcription = client.audio.transcriptions.create(
|
328 |
model="whisper-1",
|