Having issues with increasing latency on Balena Sound

Hello,

I have flashed balena os to my RPI 4 and am using/ it as a Bluetooth hub for my speaker, but for quite some time I have noticed that The audio ms keeps on increasing, up to 300ms in some cases, is there a way to set it manually on the balena cloud dashboard.

I am a noo when it comes to Linux , so please guide me through the steps

Thanks for reaching out @samipayne. Looking at the issue above, I see this had occurred generically on RPi with other OS as well. Some solution suggested use of “variable audio delay” to mask this effect. Ref: Latency when using RPi as Bluetooth audio receiver - Raspberry Pi Forums

-Nitish

Thanks for replying nittish, will use that guide.but I was hoping to get a lower latency like generic spotify connect devices , which are around 60ms.

Hi @samipayne, balenaSound developer here.

The audio latency is introduced by PulseAudio (running on the audio service). It starts with a low latency value and increases it in increments of 5msec if the device can’t keep up with the audio samples processing. A latency in the range of 200 / 300 msec is to be expected for these type of devices in balenaSound as we don’t optimize for latency.

The only thing you can do to alter the latency behavior is to set a minimum latency value via SOUND_INPUT_LATENCY as described here: Customization - Home. PulseAudio will then try to honor the value you provided. This can be useful sometimes if you are experiencing audio cuts/hiccups whenever the latency is adjusted.