CobaltZvc commited on
Commit
cd5caf9
1 Parent(s): 639b1ac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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", file)
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