Just uploaded my first component to PyPI : streamlit-mic-recorder
It is made for voice recording and easy text to speech implementation in your app.
I tried to make its usage as reliable and easy as can be, and struggled to make it look just like an
st.button widget whatever the theme you choose for your app.
The mic_recorder function records the user’s mic and outputs a dictionary containing the mono audio/wav bytes (along with sample rate and sample width) that will play directly in st.audio, can be written as is to a .wav file, or passed to any audio processing/STT tools you prefer.
The speech_to_text function relies on the SpeechRecognition module to perform speech to text and return the transcribed text directly.
You’ll find all the info you need in the repo.
Give it a try and tell me your feedbacks.