No project description provided
Project description
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_level
to 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:
- Text: specify the text displayed next to the icon
- 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(
text="",
recording_color="#e8b62c",
neutral_color="#6aa36f",
icon_name="user",
icon_size="6x",
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for audio-recorder-streamlit-0.0.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 078bdb7e0c10ee3d7cb8e30c16cb836ebcb9515092608c3a5cb2998224b1b1e2 |
|
MD5 | b43284c29cd344f83cbaf5d7234cce2a |
|
BLAKE2b-256 | 65e1fc8bbd207c321a37afb44a83b81481b3f608c9b6f8b9f1778b2aa25942a4 |
Close
Hashes for audio_recorder_streamlit-0.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c70476af5dde98dbeb19f923ae1b80b088e480464a1cdc1fa6332e880e1c3498 |
|
MD5 | b9b81391a98aa55cfc56712c10d6c936 |
|
BLAKE2b-256 | 1bd74e0293fa9838a7797d018d0a23d4c6537bb8579d9965fd5c5c7b772d33f3 |