Brought back text to speech
Browse files
app.py
CHANGED
@@ -331,11 +331,11 @@ if user_message:
|
|
331 |
st.session_state.mood_trend_symbol = mood_trend_symbol
|
332 |
st.session_state.show_question = show_question
|
333 |
|
334 |
-
if input_mode == "Speech":
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
|
340 |
# Show/hide "Behind the Scene" section
|
341 |
# section_visible = st.sidebar.button('Show/Hide Behind the Scene')
|
|
|
331 |
st.session_state.mood_trend_symbol = mood_trend_symbol
|
332 |
st.session_state.show_question = show_question
|
333 |
|
334 |
+
#if input_mode == "Speech":
|
335 |
+
# Convert the response to speech
|
336 |
+
speech_fp = text_to_speech(llm_reponse_with_quesiton)
|
337 |
+
# Play the speech
|
338 |
+
st.audio(speech_fp, format="audio/mp3")
|
339 |
|
340 |
# Show/hide "Behind the Scene" section
|
341 |
# section_visible = st.sidebar.button('Show/Hide Behind the Scene')
|