Skip to main content

Async Python implementation of the Resonate Protocol.

Project description

aioresonate

pypi_badge

Async Python library implementing the Resonate Protocol.

For a WIP reference implementation of a server using this library, see Music Assistant

A project from the Open Home Foundation

CLI Client

Note: The CLI client is currently included in the aioresonate library for development purposes. Once the Resonate Protocol stabilizes, it will be moved to a separate repository and package. This will require users to uninstall aioresonate[cli] and install the new CLI package separately.

This repository includes a highly experimental CLI client for testing and development purposes.

Quick Start

Run directly with uv:

uvx --from "aioresonate[cli]" resonate-cli

Installation

With pip:

pip install "aioresonate[cli]"

With uv:

uv tool install "aioresonate[cli]"
Install from source
git clone https://github.com/Resonate-Protocol/aioresonate.git
cd aioresonate
pip install ".[cli]"

After installation, run:

resonate-cli

The CLI client will automatically connect to a Resonate server on your local network and be available for playback.

Configuration Options

Client Identification

If you want to run multiple CLI clients on the same computer, you can specify unique identifiers:

resonate-cli --id my-client-1 --name "Kitchen"
resonate-cli --id my-client-2 --name "Bedroom"
  • --id: A unique identifier for this client (optional; defaults to resonate-cli-<hostname>, useful for running multiple instances on one computer)
  • --name: A friendly name displayed on the server (optional; defaults to hostname)

Audio Output Device Selection

By default, the CLI client uses your system's default audio output device. You can list available devices or select a specific device:

List available audio devices:

resonate-cli --list-audio-devices

This displays all audio output devices with their IDs, channel configurations, and sample rates. The default device is marked.

Select a specific audio device:

resonate-cli --audio-device 2

This is particularly useful for headless devices or when you want to route audio to a specific output.

Adjusting Playback Delay

The CLI supports adjusting playback delay to compensate for audio hardware latency or achieve better synchronization across devices.

Setting delay at startup:

resonate-cli --static-delay-ms -100

Note: Based on limited testing, the delay value is typically a negative number (e.g., -100 or -150) to compensate for audio hardware buffering.

Adjusting delay in real-time: While the client is running, you can use the delay command:

  • delay - Show current delay value
  • delay <ms> - Set absolute delay (e.g., delay -100)
  • delay + <ms> - Increase delay (e.g., delay + 50)
  • delay - <ms> - Decrease delay (e.g., delay - 25)

The synchronization will seamlessly adjust to the new delay value within a couple of seconds.

Debugging & Troubleshooting

If you experience synchronization issues or audio glitches, you can enable detailed logging to help diagnose the problem:

resonate-cli --log-level DEBUG

This provides detailed information about time synchronization. The output can be helpful when reporting issues.

Limitations & Known Issues

This client is highly experimental and has several known limitations:

  • Platform Support: Only tested on Linux; macOS and Windows support untested
  • Format Support: Currently fixed to uncompressed 44.1kHz 16-bit stereo PCM
  • CLI User Experience: The CLI is pretty bare bones for now
  • Configuration Persistence: Settings are not persistently stored; delay must be reconfigured on each restart using the --static-delay-ms option

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aioresonate-0.13.0.tar.gz (78.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aioresonate-0.13.0-py3-none-any.whl (86.9 kB view details)

Uploaded Python 3

File details

Details for the file aioresonate-0.13.0.tar.gz.

File metadata

  • Download URL: aioresonate-0.13.0.tar.gz
  • Upload date:
  • Size: 78.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for aioresonate-0.13.0.tar.gz
Algorithm Hash digest
SHA256 c53b271e0b0fe81bfe34f1fd3331ba0d678b8f1e7b73b5735e39df2b7889a3b4
MD5 ce8d68f71720373f6c226497868d18aa
BLAKE2b-256 3ca4431100aa8b62ef241c44cb053e317f47a310d587bc202c8378147159afce

See more details on using hashes here.

Provenance

The following attestation bundles were made for aioresonate-0.13.0.tar.gz:

Publisher: release.yml on Resonate-Protocol/aioresonate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aioresonate-0.13.0-py3-none-any.whl.

File metadata

  • Download URL: aioresonate-0.13.0-py3-none-any.whl
  • Upload date:
  • Size: 86.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for aioresonate-0.13.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6d0cca543c5fe7c8cbb193e7acd8839ee1faf5b30dc6cc90fdfe0c5233b39d0f
MD5 9d4eac900a5dd648511ee8a7a14ace54
BLAKE2b-256 0020bef5b62aa6829cf4561a8a6901b7cbc53f25b6f9c0b96cc7ddf45c091d48

See more details on using hashes here.

Provenance

The following attestation bundles were made for aioresonate-0.13.0-py3-none-any.whl:

Publisher: release.yml on Resonate-Protocol/aioresonate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page