So, I have been battling to get this right now for some time, that I actually just gave up and am now readdressing it.
I want to use HA and my wall tablet to play music. I have installed and configured Music Assistant and have setup a separate Raspberry PI 5 with a HiFi Berry DAC+ into the AMP. I am using YouTube Music as the Provider.
Here are my questions/issues.
If anyone is using the PI as a media streamer, what are you using? Right now i’m using MPD and Mopidy but I can get this working reliably.
I have installed and configured shairport-sync for casting via AirPlay. This works, and the only way I have been able to cast from Music Assistant to the PI is via AirPlay (adding AirPlay as a player).
Control from Music Assistant is slow. When playing a tracking, or changing a track there is a substantial delay, like 10s.
Is there a better way to do this in terms of using the PI? The PI is connected via ethernet so I would expect pretty snappy performance. Or is the issue with Music Assistant directly?
I am interested to know what others are doing to get a streamlined and simple solution to playing music from wall tablet through HA.
You are using a number of components I am not familiar with (Music Assistant, AirPlay, YouTube music) so any of them could be the issue (or not).
Your Wi-Fi could also be the issue? I suppose you would need a good connection for the tablet (and to and from Internet), especially if that’s the source.
I have a slightly different setup (my music source is Mopidy on my NAS, and everything is wired Ethernet (except the phone remotes, but they are only doing control)) and there can still be a lag of a few seconds when starting an Internet Radio stream. But not playing a song from the local hard drive. So maybe try to do that next, just as a comparison / troubleshooting step.
how is performance overall? This could be memory issue or maybe there is so transcoding needed for playback that causing significant delay. Anyway not sure how but you need to check CPU and Memory use during these times. If usage is >50% you likely are running into limits of Pi. If it is causing the noticeable issue I would expect these to be over 80%.
Network is just one side of the equation. Music Assistant doesnt run poorly for other so likely any problem is with your setup. If it was consistently that bad it would not be popular or useful.
This sounds like a caching thing.
The device will cache a few seconds of the new track, before it starts playing it to prevent jitter/lag from a network source that might deliver data in chunks.
I would suggest Lyrion (aka lms) via picoreplayer as music server. For player there various option’s, you could use a raspberry pi but also an airplay device. All depends on the plugins you install. Best plugin is material skin to get a modern gui. Followed Bij airplay plugin to control a airplay player
Here working for almost 20 years.