Open creme17 opened 7 months ago
yes you can save it in this way once you stop the recording -
import tempfile
from st_audiorec import st_audiorec
wav_audio_data = st_audiorec()
if wav_audio_data is not None:
st.audio(wav_audio_data, format='audio/wav')
with tempfile.NamedTemporaryFile(delete=False, suffix=".wav") as temp_file:
temp_file.write(wav_audio_data)
temp_file_path = temp_file.name
st.success(f"Audio saved to {temp_file_path}")
Hello!
I love this app, thank you so much for developing. It's very easy to use however I'm trying to save down the audio file to a server location once the stop button is pressed, which works, but takes an extremely long time to once the audio recording is longer than a couple of seconds (though downloading the file locally to my machine works well). Does anyone know of a potential workaround that would speed up the processing, ie leveraging or compressing the audio? Would appreciate any insights!