Beautiful audio stream player component for Streamlit with frequency visualization and state animations
Project description
Streamlit Audio Stream Player
Beautiful audio stream player component for Streamlit with frequency visualization and animated state transitions, inspired by ElevenLabs UI design.
Installation
pip install streamlit-audio-stream-player
Quick Start
import streamlit as st
from streamlit_audio_stream_player import audio_stream_player
import time
st.title("🎵 Audio Stream Player Test")
# Session state
if 'play_count' not in st.session_state:
st.session_state.play_count = 0
# Audio stream options
stream_options = {
"Radio Paradise (MP3)": "https://stream.radioparadise.com/mp3-128",
"BBC World Service": "https://stream.live.vc.bbcmedia.co.uk/bbc_world_service",
"Custom URL": "custom"
}
selected_stream = st.selectbox("Select Audio Stream", list(stream_options.keys()))
if selected_stream == "Custom URL":
stream_url = st.text_input("Enter Audio Stream URL", value="https://stream.radioparadise.com/mp3-128")
else:
stream_url = stream_options[selected_stream]
st.info(f"🎧 Current Audio Stream: {stream_url}")
# Display audio stream player
if stream_url:
audio_stream_player(
stream_url=stream_url,
key=f"player_{st.session_state.play_count}"
)
st.markdown("---")
st.caption("💡 Tip: If you don't hear sound, check the browser console (F12) for error messages and verify the audio stream URL is valid.")
⚠️ Browser Compatibility Warning: Safari may have issues with audio streaming due to CORS restrictions. For best results, use Chrome or Firefox.
License
MIT
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file streamlit_audio_stream_player-0.2.0.tar.gz.
File metadata
- Download URL: streamlit_audio_stream_player-0.2.0.tar.gz
- Upload date:
- Size: 1.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3aa699aa281f3cb3b56c6e3191e89dd947a85a1221dcc11fa26c56ef49893110
|
|
| MD5 |
36ef2a2e1f40aa8e9899b3f2e3e89ae6
|
|
| BLAKE2b-256 |
ea02a4b391535890807d5a943c3fc7900d7641ab394d2fafe46ce76804ac3b6b
|
File details
Details for the file streamlit_audio_stream_player-0.2.0-py3-none-any.whl.
File metadata
- Download URL: streamlit_audio_stream_player-0.2.0-py3-none-any.whl
- Upload date:
- Size: 99.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
165d14b31a15edfb1c2e6b89cb7aade68ac81601ca079407c0572def1dfde12a
|
|
| MD5 |
5ac60c395c6baba9db79dad6fea62b73
|
|
| BLAKE2b-256 |
78c7c4e933fb45041e2a1f1bbb3e61498bc16c769900e82017c2ae028a7e4861
|