Pre-release
This release is a pre-release and may not be stable for production use.
Audio record streamlit
This streamlit component allows to register an audio utterence from a user.
Installation
pip install audio-recorder-streamlit
Usage
import streamlit as st
from audio_recorder_streamlit import audio_recorder
audio_bytes = audio_recorder()
if audio_bytes:
st.audio(audio_bytes, format="audio/wav")
Recording parameters
You can adjust the recording parameters energy_threshold and
pause_threshold:
energy_threshold: The energy recording sensibility above which we consider that the user is speaking.pause_threshold: The number of seconds to spend belowenergy_levelto automatically stop the recording.
# The recording will stop automatically
# 2 sec after the utterance end
audio_bytes = audio_recorder(pause_threshold=2.0)
Styling parameters
You can adjust the button style parameters:
- Icon: specify the icon among the font awesome solid icons (https://fontawesome.com/search?o=r&s=solid)
- Color: specify the neutral color and recording color.
- Size: specify the icon size using font awesome sizing (https://fontawesome.com/docs/web/style/size).
audio_bytes = audio_recorder(
recording_color="#e8b62c",
neutral_color="#6aa36f",
icon_name="user",
icon_size="6x",
)
Metadata
Release files for audio-recorder-streamlit 0.0.6.dev0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| audio_recorder_streamlit-0.0.6.dev0-py3-none-any.whl | Python 3 | none | any | Details |
Release files / audio_recorder_streamlit-0.0.6.dev0-py3-none-any.whl
| Download URL | audio_recorder_streamlit-0.0.6.dev0-py3-none-any.whl |
|---|---|
| Size | 1.2 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
28b6a1620b1723ac028d7c7f329ce3a23469e8397e645b1749d3f569488416a9
|
|
BLAKE2b-256 checksum How to use checksums |
20c313ea14a9c4bf8f06f542f55c28ffc8bacbe324223ce80c08bbebee56b875
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.0
|