FutureProofHomes / wyoming-enhancements

Integrate Magical ChatGPT Capabilities With Home Assistant's Wyoming Voice Satellite.
MIT License
119 stars 20 forks source link

Issue with SnapClient #33

Open edbrk opened 8 months ago

edbrk commented 8 months ago

Hello, So i followed the tutorial for the enhancements to install your own Music Assistant on the Wyoming Voice Satellite.

Using an identical configuration. Including hardware with a rasberry pi 2 zero w, I'm getting intermittent cut-outs of audio when playing music and general use of the voice assistant. This error appears in the snapclient journelctl log.

Mar 07 02:18:15 raspberrypi snapclient[882]: Exception: Not enough frames available, requested frames: 888, available: 212 Mar 07 02:18:15 raspberrypi snapclient[882]: Exception: Not enough frames available, requested frames: 1752, available: 1662 Mar 07 02:18:16 raspberrypi snapclient[882]: Exception: Not enough frames available, requested frames: 1728, available: 759 Mar 07 02:18:21 raspberrypi snapclient[882]: Exception: Not enough frames available, requested frames: 1752, available: 772 Mar 07 02:18:21 raspberrypi snapclient[882]: Exception: Not enough frames available, requested frames: 896, available: 17 Mar 07 02:18:34 raspberrypi snapclient[882]: Exception: Not enough frames available, requested frames: 888, available: 838 Mar 07 02:19:02 raspberrypi snapclient[882]: Exception: Not enough frames available, requested frames: 888, available: 501 Mar 07 02:19:02 raspberrypi snapclient[882]: Exception: Not enough frames available, requested frames: 896, available: 170 Mar 07 02:19:05 raspberrypi snapclient[882]: Exception: Not enough frames available, requested frames: 1684, available: 1533 Mar 07 02:19:05 raspberrypi snapclient[882]: Exception: Not enough frames available, requested frames: 888, available: 136

It seems to me maybe some network instability is causing this? Not entirely sure. Is there any way to lower that amount of requested frames, or maybe increase the buffer, would prefer there to be a bit of a delay if it meant this didnt happen. Every time it seems to be requesting 888.

Thanks!

n8ohu commented 8 months ago

If you adjusted the settings to 333 in the Snapcast server, try setting them to 500 or higher and see if that makes it go away.

edbrk commented 8 months ago

Hmmm this is an interesting discovery. When plugged into decent headphones, it seems to stutter but when plugged into separately powered speakers it seems to perform fine.

My only guess for this is that when plugged into headphones the raspberry pi is not able to use much power as some is being diverted to the headphones, meaning it under performs causing the stuttering.

debdalerichard commented 4 months ago

Silly question...what power supply are you using to power the raspberry pi?? i run mine with at least 5Amp