Spaces:
Sleeping
Sleeping
Commit
·
44b3eba
1
Parent(s):
0379ccf
Update app.py
Browse files
app.py
CHANGED
|
@@ -85,10 +85,10 @@ if submit:
|
|
| 85 |
|
| 86 |
st.write(response)
|
| 87 |
# Text-to-speech
|
| 88 |
-
audio_response = openai.
|
| 89 |
-
|
|
|
|
| 90 |
voice="alloy",
|
| 91 |
-
input=response
|
| 92 |
)
|
| 93 |
# Embed audio in the webpage
|
| 94 |
st.audio(audio_response["url"])
|
|
|
|
| 85 |
|
| 86 |
st.write(response)
|
| 87 |
# Text-to-speech
|
| 88 |
+
audio_response = openai.Audio.create(
|
| 89 |
+
engine="tts-1",
|
| 90 |
+
text=response,
|
| 91 |
voice="alloy",
|
|
|
|
| 92 |
)
|
| 93 |
# Embed audio in the webpage
|
| 94 |
st.audio(audio_response["url"])
|