Update app.py
Browse files
app.py
CHANGED
|
@@ -190,6 +190,11 @@ if prompt := st.chat_input("How can I help you today?"):
|
|
| 190 |
message_placeholder.markdown(full_response)
|
| 191 |
|
| 192 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 193 |
if "reference" not in st.session_state:
|
| 194 |
st.session_state.reference = False
|
| 195 |
if "audio" not in st.session_state:
|
|
|
|
| 190 |
message_placeholder.markdown(full_response)
|
| 191 |
|
| 192 |
|
| 193 |
+
sound_file = BytesIO()
|
| 194 |
+
tts = gTTS(result['result'], lang='en')
|
| 195 |
+
tts.write_to_fp(sound_file)
|
| 196 |
+
st.audio(sound_file)
|
| 197 |
+
|
| 198 |
if "reference" not in st.session_state:
|
| 199 |
st.session_state.reference = False
|
| 200 |
if "audio" not in st.session_state:
|