Please guys, i need help with my streamlit app. I used pyaudio for getting audio input for my chatbot. It works on my local server but throws this error when the mic button is used for the deployed app:
OSError: No Default Input Device Available
Please guys, i need help with my streamlit app. I used pyaudio for getting audio input for my chatbot. It works on my local server but throws this error when the mic button is used for the deployed app:
OSError: No Default Input Device Available
That is because the deployment machine doesn’t have a mic. Streamlit doesn’t provide a way to send audio from the browser to the application, but there is a third party component that may help:
This is a typical misunderstanding of how Streamlit works. When pyaudio wants to record/playback audio data, it accesses the audio hardware of the machine running the Streamlit application. But in the hosted environment, there is no audio-driver, no audio-hardware and no microphone. If you test this app locally, it happens to work because the client and server are identical, but once the Streamlit app is hosted, this approach is doomed to failure. Any user interaction in a Streamlit application must be done through the browser respectively browser APIs. That means you have to use a Streamlit component for audio recording/playback (and also any other hardware access on the clients side).
Thank you very much @Goyo
I will try it out now
Okay, @Franky1 . I understand now.
Thank you very much
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.