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.
By the way, I noticed that st.button’s background and border color are not exactly colors passed in the theme prop, but look like weighted averages of these colors.
I iterated to get a closely enough result but it’s still not exactly right.
Could a streamlit dev give some details on how these colors are computed ? This could be helpful when we want to design components that integrate well in any theming of the app.
That sounds like an amazing component! Thank you for sharing it with us!
Could a streamlit dev give some details on how these colors are computed ? This could be helpful when we want to design components that integrate well in any theming of the app.
Regarding your request, @jrieke might be able to direct you to the right people.