vishwask commited on
Commit
07c2661
1 Parent(s): 83c65af

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
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: