Walterchamy commited on
Commit
40f6f14
1 Parent(s): c717833

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py CHANGED
@@ -204,6 +204,13 @@ def generate_response(user_input):
204
  )
205
  return response.choices[0].message.content
206
 
 
 
 
 
 
 
 
207
 
208
  def main():
209
  col1, col2 = st.columns([1, 4])
 
204
  )
205
  return response.choices[0].message.content
206
 
207
+
208
+ def text_to_speech(text):
209
+ tts = gTTS(text=text, lang=('en'))
210
+ tts.save('output.mp3')
211
+
212
+ st.audio("output.mp3")
213
+
214
 
215
  def main():
216
  col1, col2 = st.columns([1, 4])