But, how can I customize this component? For example, I don’t want the download button, nor the ability to playback the audio on the screen. How can I achieve this?
I attached a screenshot of my app for reference. I appreciate any help I can get here! Thank you
To remove the audio playback, you can delete the line with st.audio() from the app.py file. As for the download button it is inherently displayed by the component. However, you can also try to hide the download button by customizing the CSS element (see this video on getting started with this https://youtube.com/watch?v=gr_KyGfO_eU)
Thanks for the response! Unfortunately, the audio playback is still there even after removing the st.audio() line. In fact, the only code I have in the audiorec_demo_app() function is as follows:
def audiorec_demo_app():
# TITLE
st.title('Recording/listening app')
st.markdown('Press the buttons below to start recording.')
st.write('\n\n')
# once a recording is completed, audio data will be saved to wav_audio_data
wav_audio_data = st_audiorec() # tadaaaa! yes, that's it! :D
Perhaps you can try a hacky approach by making the necessary changes to a forked repo of the library. Then install that by defining the URL in the requirements.txt file as described in the following Docs page:
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
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.
Performance cookies
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.
Functional cookies
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.
Targeting cookies
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.