Custom component, implemented by Stefan Rummer,
based on doppelgunner 's Audio-React-Recorder
- Manage access to the user's microphone via the browser's Media-API
- Record, playback and revert audio-recordings in apps deployed to the web
- Download the final recording to your local system! - WAV, 16 bit, 44.1 kHz
- Directly return audio recording-data to Python backend! - arrayBuffer format
1. PIP Install the component (download from PyPI)
pip install streamlit-audiorec
2. Import and Initialize the component (at the top of your script)
from st_audiorec import st_audiorec
3. Add an Instance of the audio recorder to your streamlit app's code.
wav_audio_data = st_audiorec()
if wav_audio_data is not None:
st.audio(wav_audio_data, format='audio/wav')
4. Enjoy recording audio inside your streamlit app! 🎈
Feel free to reach out to me in case you have any questions!
Pls consider leaving a star
☆ with this repository to show your support.
1. 작업 중인 디렉토리 하위에 'streamlit-audio-recorder' 디렉토리 복사
2. Frontend 의존성 설치 및 bulid
- 의존성 설치
cd 작업중인디렉토리이름/streamlit-audio-recorder/frontend npm install
- 환경 변수 설정 : NODE_OPTIONS 환경 변수를 설정하여 OpenSSL의 레거시 암호화 기능을 활성화해야함
export NODE_OPTIONS=--openssl-legacy-provider
- 빌드
npm run build
3. 패키지 설치
- setup.py 파일이 있는 디렉토리로 이동
cd 작업중인디렉토리이름/streamlit-audio-recorder
- 패키지 설치
pip install -e .
4. "init.py" 파일 자체를 수정한거라서 from st_audiorec import st_audiorec 로 임포트해도 한국어 버튼 나옴