Radio Broadcaster
Broadcast internet radio streams over Bluetooth LE Audio (Auracast) using Python. This tool allows you to stream audio from any HTTP/HTTPS audio source to Bluetooth LE Audio receivers with support for custom manufacturer data and encryption.
Features
- Stream internet radio over Bluetooth LE Audio (Auracast)
- Support for custom manufacturer-specific data in BLE advertising
- Optional broadcast encryption
- Customizable broadcast name
- Verbose logging for debugging
- Pure Python implementation using PyAV and Bumble
Requirements
- Python 3.12+
- Bluetooth LE Audio compatible interface (USB Bluetooth adapter or serial connection)
- Internet connection for radio stream
Tested Hardware
This project is tested with the hci_uart_bumble controller which provides a serial-based HCI interface for Bluetooth LE Audio.
Note: While other controllers may work, we only test and recommend the hci_uart_bumble controller. Other controllers are not tested against this project.
Installation
Development Setup
- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Linux/macOS
# or
venv\Scripts\activate # On Windows
- Install the package in editable mode with dev dependencies:
pip install -e ".[dev]"
Production Install
pip install .
Usage
# Show help
radio-broadcaster --help
# Show version
radio-broadcaster --version
# Broadcast a radio stream
radio-broadcaster <URL>
# Broadcast with custom name
radio-broadcaster <URL> -n "My Station"
# Broadcast with encryption
radio-broadcaster <URL> -c "my-password"
# Broadcast with manufacturer data (example: Nordic Semiconductor)
radio-broadcaster <URL> --manufacturer-data 0x0059:010203
# Broadcast with verbose output
radio-broadcaster <URL> --verbose
# Broadcast with custom transport (serial port)
radio-broadcaster <URL> -t "serial:/dev/ttyACM0,1000000"
Options
-t, --transport SPEC: Bumble transport specifier (default: usb:0)- Examples:
usb:0,hci:0,serial:/dev/ttyACM0,1000000
- Examples:
-n, --name NAME: Broadcast name visible to receivers (default: "Radio Broadcaster")-c, --code PASSWORD: Encryption password (max 16 characters)--manufacturer-data COMPANY_ID:HEX_DATA: Manufacturer-specific data (can be used multiple times)- Example:
0x0059:010203(Nordic Semiconductor with data 01 02 03)
- Example:
-v, --verbose: Enable verbose output-V, --version: Show version information and exit
Development
Continuous Integration
This project uses GitHub Actions to automatically run quality checks on all pushes and pull requests:
- Tests: Runs all pytest tests
- Type Checking: Verifies type annotations with mypy
- Code Formatting: Checks code style with black
- Linting: Runs ruff for code quality
All checks must pass before merging to main or develop branches.
Releases and PyPI Publishing
Releases are automatically published to PyPI when you create a GitHub release or push a tag matching v* (e.g., v1.0.0). The publishing workflow uses PyPI's Trusted Publishers feature, which authenticates via GitHub's OIDC token without requiring stored secrets.
To create a release:
- Update the version in
pyproject.tomlif needed - Commit the changes:
git commit -m "Bump version to X.Y.Z" - Create and push a git tag:
git tag vX.Y.Z && git push origin vX.Y.Z - The GitHub Actions workflow automatically builds and publishes the package to PyPI
The package will be available at https://pypi.org/project/radio-broadcaster/
Running Tests
pytest
Code Formatting
black src tests
Linting
ruff check src tests
Type Checking
mypy src
License
Apache License 2.0
Metadata
Release files for radio-broadcaster 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| radio_broadcaster-0.0.2.tar.gz | 21.7 kB | With provenance | Details for radio_broadcaster-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| radio_broadcaster-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for radio_broadcaster-0.0.2-py3-none-any.whl |
Total release size: 37.7 kB
Release files / radio_broadcaster-0.0.2.tar.gz
| Download URL | radio_broadcaster-0.0.2.tar.gz |
|---|---|
| Size | 21.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
99dae5bc1211c320a1134901144af4ac16028c6780dd29ee5b3bcc48678b09d8
|
|
BLAKE2b-256 checksum How to use checksums |
746552db986e8a5ac1a8980a5a318cffd0b6cb50f9667532644b6da740d244e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 7, 2026.
Transparency logRelease files / radio_broadcaster-0.0.2-py3-none-any.whl
| Download URL | radio_broadcaster-0.0.2-py3-none-any.whl |
|---|---|
| Size | 16.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3f55cd01b8cf7479eecc28990ce37cb62b86f1a492922390103683db3f7788ef
|
|
BLAKE2b-256 checksum How to use checksums |
af1ab68f7963198a637c6fb7fa405014d9489c193363ce01ee752a734610c893
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 7, 2026.
Transparency logSecurity for radio-broadcaster 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for radio_broadcaster-0.0.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 7, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.