Speech to text in st.chat_input

Is there a way to enable the “mic” icon in the st.chat_input component so we can have the user use speech to text (provided it is supported by his browser).

I’ve seen this project on Github, GitHub - Daniel-Hug/speech-input: Simple speech input for <input>s —replaces the now defunct x-webkit-speech attribute, could that be integrated (manually by us at application code level. I don’t think I have the skills to do that , but if others can and share how to, I could probably, or later have it integrated into Streamlit @andfanilo )?

Thanks for any feedback.

3 Likes

Hi @Alexandre_Dumont
I have found a solved helpful discussion for your query that will possibly help you regarding this problem. Thank you
Here is the link:
https://discuss.streamlit.io/t/record-sound-from-the-users-microphone-with-streamlit/5590

It seems to help with having a Record button in the application, what I’m looking for though is how to add to a streamlit app the linked (in my post) javascript library (or any equivalent one) to have the native browser microphone icon show in the textarea of a chat_input component, in order to do client side TTS and fill in the st.chat_input fied with the spoken text.

(unfortunately, I fail to see how I would do it with what you replied)

2 Likes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.