Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +3 -1
src/streamlit_app.py
CHANGED
|
@@ -117,8 +117,10 @@ if "current_chat_id" in st.session_state:
|
|
| 117 |
loadchats()
|
| 118 |
user_input = st.chat_input("Your message:")
|
| 119 |
if st.session_state.mic:
|
|
|
|
|
|
|
| 120 |
# st.session_state.tospeak = True
|
| 121 |
-
with sr.AudioFile(
|
| 122 |
try:
|
| 123 |
st.toast("Recognizing...")
|
| 124 |
r = st.session_state.recognizer
|
|
|
|
| 117 |
loadchats()
|
| 118 |
user_input = st.chat_input("Your message:")
|
| 119 |
if st.session_state.mic:
|
| 120 |
+
audio = st.session_state.mic
|
| 121 |
+
st.session_state.mic = None
|
| 122 |
# st.session_state.tospeak = True
|
| 123 |
+
with sr.AudioFile(audio) as source:
|
| 124 |
try:
|
| 125 |
st.toast("Recognizing...")
|
| 126 |
r = st.session_state.recognizer
|