Replies: 10 comments 5 replies
-
|
This would be very cool and i'm definitely willing to help test it out. |
Beta Was this translation helpful? Give feedback.
-
|
Just pushed some minor bug fixes (mute in MA didn't mute the sendspin client). Also added the option to not duck sendspin audio on voice events. Default behavior is to duck to 20%. |
Beta Was this translation helpful? Give feedback.
-
|
Today's push has fixed some bugs with the sendspin player disconnecting on track change and pause events from the MA. Up next will be to enable additional codecs as the client is currently hard coded to PCM. |
Beta Was this translation helpful? Give feedback.
-
|
Hey there! I guess I can just switch to the sendspin branch on an existing linux-voice-assistant right? |
Beta Was this translation helpful? Give feedback.
-
|
I just pushed a change that enable the configuration of supported and preferred codec via config.json setting. I have also added opuslib as a python library dependency in pyproject.toml. You will need to run script/setup --sendspin again to install it. Currently opus, flac, and pcm are working. This is the relevant setting for config.json. I just submitted the commit that enables reliable playback with flac via ffmpeg. FFMPEG is a dependency for flac support and must be installed in the OS. Default path is /usr/bin/ffmpeg but it is a configuration option noted in the config.json.example file. ,
"sendspin": {
"enabled": true,
"coordination": {
"duck_during_voice": true },
"connection": {
"mode": "client_initiated",
"mdns": true,
"server_host": null,
"server_port": 8927,
"server_path": "/sendspin" },
"roles": {
"player": true,
"metadata": true,
"controller": true,
"artwork": false,
"visualizer": false },
"player": {
"preferred_codec": "opus",
"supported_codecs": ["opus","flac","pcm"],
"sample_rate": 48000,
"channels": 2,
"bit_depth": 16,
"buffer_capacity_bytes": 1048576
}
} |
Beta Was this translation helpful? Give feedback.
-
|
I just merged the sendspin and configurable_oww_thresholds branches into main. Feel free to open issue if you run into anything. |
Beta Was this translation helpful? Give feedback.
-
|
Is the audio supposed to actually be synchronized between devices? I've got a rpi4 and a rpi5 and they are far from synchronized when playing in a sendspin group. |
Beta Was this translation helpful? Give feedback.
-
|
I just added a clock_sync.py function to the sendspin client. There is a significant number of knobs available for the config.json file to help tune the client. All of the options and a description of their function has been added to the config.json.example file. |
Beta Was this translation helpful? Give feedback.
-
|
The changes continue. I had the LVA Sendspin code compared to the Sendspin-CLI client and implemented a lot of the sync functionality that is used in that project. I am now able to establish a stable sync with an ESP32-S3 sendspin client without it drifting. These are the sendspin config.json settings that I am using. All knobs have been updated in the config.json.example file. Due to differences in chipsets and the mpv player pipeline, there may be a consistent lead/lag when compared to other sendspin clients. Especially when they are on other platforms (i.e. ESP32). The best knob for bringing the LVA sendspin client into initial sync (calibrate) is the output_latency_ms. My client was a ~1 second behind the other player. The -600 value has closed that to a point that it is hard to hear a difference, but you may need to adjust accordingly based on what your testing show. Here is a good rule for tuning: LVA player 1 second behind other player = "output_latency_ms": -600 Then make adjustments until the two players are synchronized. |
Beta Was this translation helpful? Give feedback.
-
|
Just did a fresh install and, although I'm not using sendspin, I could not get the LVA service to work without installing it. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Let's kick the tires!
1) Clone the branch
git clone --branch sendspin_client --single-branch https://github.com/imonlinux/linux-voice-assistant cd linux-voice-assistant2) Install dependencies
Run setup with the flag for sendspin:
3) Update
config.jsonto enable SendspinAdd a
sendspinsection at the top-level of yourconfig.json.Minimal example:
{ "sendspin": { "enabled": true, "connection": { "mdns": true } } }See the config.json.example for all the Sendspin configuration options
This is my working config file at the time that this is posted.
{ "app": { "name": "LVA Sendspin" }, "audio": { "volume_sync": false, "max_volume_percent": 100 }, "mqtt": { "host": "192.168.1.2", "port": 1883, "username": "mqtt_user", "password": "mqtt_password" }, "led": { "enabled": true, "led_type": "dotstar", "interface": "gpio", "clock_pin": 13, "data_pin": 12, "num_leds": 40 }, "button": { "enabled": true, "mode": "gpio", "pin": 17, "long_press_seconds": 1.0, "poll_interval_seconds": 0.01 }, "sendspin": { "enabled": true, "connection": { "mode": "client_initiated", "mdns": true, "server_host": null, "server_port": 8927, "server_path": "/sendspin" }, "roles": { "player": true, "metadata": true, "controller": true, "artwork": false, "visualizer": false }, "player": { "preferred_codec": "pcm", "supported_codecs": ["pcm"], "sample_rate": 48000, "channels": 2, "bit_depth": 16, "buffer_capacity_bytes": 1048576 } } }Notes:
connection.server_hostis set, mDNS discovery is skipped.mdns: true.4) Preferences: persisting Sendspin volume
This branch persists the last Sendspin client volume to
preferences.jsonso it can be restored at startup and reported to MA immediately.Example
preferences.json:{ "active_wake_words": ["okay_computer"], "volume_level": 1.0, "num_leds": 40, "alarm_duration_seconds": 10, // New: "sendspin_volume": 42 }Notes:
sendspin_volumeis 0–100 (Sendspin/MA style).volume_level(LVA master OS volume). I haven't tested with "volume_sync": true.5) Start LVA and verify Sendspin connects
Run LVA with debug enabled so you can see the handshake:
What you should see (examples):
Discovery:
Sendspin: discovered ... _sendspin-server._tcp.local. -> <ip>:8927/sendspinWebsocket connect:
Sendspin: connecting to ws://<ip>:8927/sendspinHandshake:
client/hello sentserver/hello receivedState heartbeats:
client/state heartbeat sent ...6) Test in Music Assistant UI
LVA Sendspinor the MAC-derived ID).Expected results:
7) Test volume + mute behavior
Volume test (MA → LVA Sendspin)
In MA, set the player volume to 50%.
In LVA logs, you should see:
server/command ... {"command":"volume","volume":50}client/state ... {"volume":50,...}Mute test
server/commandwithmuteand state updates.8) Ducking while wakeword/voice is active
The Sendspin client can duck MA playback when LVA transitions into voice states.
Typical events published by LVA include:
voice_listenvoice_thinkingvoice_respondingvoice_idleExpected behavior:
9) Restart requirements
You must restart LVA for config/preference changes to apply.
If running as a systemd user service:
Quick “Known-good” smoke test checklist
Beta Was this translation helpful? Give feedback.
All reactions