dermetfak commited on
Commit
1009064
·
1 Parent(s): 0a73e60
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -58,9 +58,11 @@ audio = audiorecorder("Record", "Stop")
58
 
59
  if (len(audio) != st.session_state['length']):
60
  st.session_state['length'] = len(audio)
61
- wav_file = open("audio.mp3", "wb")
62
- wav_file.write(audio.tobytes())
63
- st.session_state['vignette'] += transcribe("audio.mp3")
 
 
64
 
65
 
66
  st.session_state['vignette'] = st.text_area(
 
58
 
59
  if (len(audio) != st.session_state['length']):
60
  st.session_state['length'] = len(audio)
61
+ # wav_file = open("audio.mp3", "wb")
62
+ # wav_file.write(audio.tobytes())
63
+ transcript = openai.Audio.translate("whisper-1", audio.tobytes())
64
+ transcript["text"]
65
+ st.session_state['vignette'] += transcript["text"]
66
 
67
 
68
  st.session_state['vignette'] = st.text_area(