After recording an audio clip with audio_input, I want to programmatically provide a mechanism to remove the recorded clip. I know that we can click the trash icon, but I want to replicate that functionality in code.
I am experiencing the same problem. Have you been able to solve it?
No, I am not sure what the path forward is in this case.
I don’t know if you have found a solution, but, although I wasn’t able to do it either, I thought of deleting and reinserting the widget, without leaving the audio clip on the screen.
if audio_value is not None:
wav = audio_value.read()
render_bubble("user", wav, is_audio=True)
placeholder.empty()
st.session_state["voice_input_key"] = key0 + 1
placeholder.audio_input("Click to record your voice question", key=f "voice_input_{key0+1}")