Hey Streamlit Community!
I’m excited to share Audix (streamlit-advanced-audio
), a new Streamlit component that enhances audio playback capabilities with modern UI and advanced features!
Why Audix?
While Streamlit’s built-in audio
component is great for basic playback, I found myself needing more advanced features for audio processing applications. Audix fills this gap by providing:
Beautiful waveform visualization
Real-time playback tracking
Region selection support
Extensive styling customization
Dark mode support
Quick Demo
Installation
pip install streamlit-advanced-audio
Basic Usage
from streamlit_advanced_audio import audix
# Basic playback
audix("path/to/your/audio.wav")
# With custom styling
from streamlit_advanced_audio import WaveSurferOptions
options = WaveSurferOptions(
wave_color="#2B88D9",
progress_color="#b91d47",
height=100
)
result = audix("audio.wav", wavesurfer_options=options)
# Track playback status
if result:
st.write(f"Current Time: {result['currentTime']}s")
if result['selectedRegion']:
st.write(f"Selected Region: {result['selectedRegion']['start']} - {result['selectedRegion']['end']}s")
Features
Full compatibility with original
st.audio
APIReal-time playback information tracking
Modern UI with extensive customization
Region selection for timing and trimming
Dark mode support
Links
Feel free to try it out and let me know what you think! PRs and feature suggestions are welcome!