stefanrmmr / streamlit-audio-recorder

Record Audio from the User's Microphone in Apps that are Deployed to the Web. (via Browser Media-API, REACT-based, Streamlit Custom Component)
MIT License
434 stars 80 forks source link

The audio player is being displayed twice #18

Open jojonki opened 9 months ago

jojonki commented 9 months ago

Hi,

Thank you for your great project. It really helps.

I was indeed able to record audio from the Streamlit app running on my remote server. However, when I stop the recording, two players for the same audio are displayed. Please check the attached image. Is this the default behavior?

image

My environment

if wav_audio_data is not None: st.audio(wav_audio_data, format='audio/wav')

DiwakarBasnet commented 6 months ago

The if condition and line after it is not necessary.


import streamlit as st
from st_audiorec import st_audiorec
wav_audio_data = st_audiorec()