Record audio and save it locally

Trying to record audio and save it locally. However its giving error. Any other solution ?

Using :

from st_audiorec import st_audiorec
import streamlit as st

wav_audio_data = st_audiorec()

if wav_audio_data is not None:, format='audio/wav')
1 Like

Hey @boral,

Can you share the error?

At first glance, it doesn’t look like that snippet would be saving the recording locally. You could use st.download_button to allow the user to download the recording.

1 Like

Can we save the recording automatically like without using the download button?