Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -711,9 +711,9 @@ elif Usage == 'Random Questions':
|
|
711 |
elif option_speech == 'OpenAI Whisper (Upload audio file)':
|
712 |
audio_file = st.file_uploader("Upload Audio file",type=['wav', 'mp3'])
|
713 |
if audio_file is not None:
|
714 |
-
file = open(audio_file, "rb")
|
715 |
st.audio(audio_file)
|
716 |
-
transcription = openai.Audio.transcribe("whisper-1",
|
717 |
st.write(transcription["text"])
|
718 |
result = transcription["text"]
|
719 |
question = result
|
|
|
711 |
elif option_speech == 'OpenAI Whisper (Upload audio file)':
|
712 |
audio_file = st.file_uploader("Upload Audio file",type=['wav', 'mp3'])
|
713 |
if audio_file is not None:
|
714 |
+
# file = open(audio_file, "rb")
|
715 |
st.audio(audio_file)
|
716 |
+
transcription = openai.Audio.transcribe("whisper-1", audio_file)
|
717 |
st.write(transcription["text"])
|
718 |
result = transcription["text"]
|
719 |
question = result
|