Spaces:
Runtime error
Runtime error
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +7 -2
src/streamlit_app.py
CHANGED
|
@@ -128,8 +128,13 @@ audio_shopping_list = st.audio_input(label='Shopping List')
|
|
| 128 |
|
| 129 |
if audio_shopping_list is not None:
|
| 130 |
|
| 131 |
-
audio_bytes =
|
| 132 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 133 |
|
| 134 |
st.markdown(shopping_list)
|
| 135 |
|
|
|
|
| 128 |
|
| 129 |
if audio_shopping_list is not None:
|
| 130 |
|
| 131 |
+
audio_bytes = audio_shopping_list.read()
|
| 132 |
+
|
| 133 |
+
# Write the bytes to a file
|
| 134 |
+
with open(speech_file_path, "wb") as f:
|
| 135 |
+
f.write(audio_bytes)
|
| 136 |
+
|
| 137 |
+
shopping_list = speech_to_text(speech_file_path)
|
| 138 |
|
| 139 |
st.markdown(shopping_list)
|
| 140 |
|