Metadata-Version: 2.4
Name: sendspin_auracast
Version: 0.1.0
Summary: Bridge Sendspin audio to Bluetooth LE Audio Auracast using Bumble.
Project-URL: Homepage, https://github.com/Yagoor/sendspin_auracast
Project-URL: Repository, https://github.com/Yagoor/sendspin_auracast
Project-URL: Issues, https://github.com/Yagoor/sendspin_auracast/issues
Author: Yago Fontoura do Rosario
License: MIT License
        
        Copyright (c) 2026 Yago Fontoura do Rosario
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: sendspin_auracast
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.12
Requires-Dist: aiosendspin>=5.2.0
Requires-Dist: bumble>=0.0.227
Requires-Dist: lc3py>=1.1.3; python_version >= '3.10' and ((platform_system == 'Linux' and platform_machine == 'x86_64') or (platform_system == 'Darwin' and platform_machine == 'arm64'))
Requires-Dist: numpy>=2.0
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == 'dev'
Requires-Dist: hatchling>=1.27; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.4; extra == 'dev'
Requires-Dist: twine>=5.0; extra == 'dev'
Description-Content-Type: text/markdown

# sendspin_auracast

Receive Sendspin PCM audio and broadcast it over Bluetooth LE Audio
(Auracast) using Bumble.

## Installation

```bash
pip install sendspin_auracast
```

For local development:

```bash
python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"
```

## Usage

Broadcast audio from a Sendspin WebSocket server:

```bash
sendspin-auracast ws://localhost:8927/sendspin
```

The client advertises itself as a Sendspin player, receives PCM audio chunks,
encodes them as LC3, and broadcasts them as an Auracast stream.

Use a custom Bumble transport or broadcast name:

```bash
sendspin-auracast ws://localhost:8927/sendspin \
  --transport serial:/dev/ttyACM0,1000000 \
  --name "Sendspin Auracast"
```

Broadcast with encryption:

```bash
sendspin-auracast ws://localhost:8927/sendspin --code "my-password"
```

Add manufacturer-specific BLE advertising data:

```bash
sendspin-auracast ws://localhost:8927/sendspin --manufacturer-data 0x0059:010203
```

Tune startup latency:

```bash
sendspin-auracast ws://localhost:8927/sendspin \
  --sendspin-buffer-ms 50 \
  --presentation-delay-us 20000 \
  --max-transport-latency-ms 40
```

The bridge defaults to a 100 ms advertised Sendspin player buffer. Smaller
values can reduce the delay after pressing play, while larger values may be
more reliable on busy hosts or noisy Bluetooth links.

For debugging, print received chunks instead of broadcasting:

```bash
sendspin-auracast ws://localhost:8927/sendspin --print
```

To write raw audio bytes to stdout instead:

```bash
sendspin-auracast ws://localhost:8927/sendspin --raw
```

## Development

Run tests:

```bash
pytest
```

Run linting:

```bash
ruff check .
```

Build the package:

```bash
python -m build
```

Publish to PyPI:

```bash
twine upload dist/*
```
