Spaces:
Running
Running
audio fix
Browse files
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 |
-
|
|
|
|
|
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(
|