Spaces:
Sleeping
Sleeping
| import streamlit as st | |
| from streamlit_mic_recorder import mic_recorder,speech_to_text | |
| def callback() | |
| if st.session_state.my_recorder_output: | |
| audio_bytes=st.session_state.my_recorder_output['bytes'] | |
| st.audio(audio_bytes) | |
| mic_recorder(key='my_recorder', callback=callback) | |
| text=speech_to_text( | |
| language='en', | |
| start_prompt="Start recording", | |
| stop_prompt="Stop recording", | |
| just_once=False, | |
| use_container_width=False, | |
| callback=None, | |
| args=(), | |
| kwargs={}, | |
| key=None | |
| ) |