lukasjapan / bt-speaker

A simple Bluetooth Speaker Daemon for the Raspberry Pi 3
GNU General Public License v3.0
495 stars 95 forks source link

Ways to reduce latency #70

Open ca5ua1 opened 4 years ago

ca5ua1 commented 4 years ago

I have 1 sec latency, I know it isn't much but I want to use it for calls. Any ways to reduce latency? I want to reduce it to 0.5sec. Any Ideas?

ca5ua1 commented 4 years ago

Hey There is another way to do it (it worked better for me less latency and no 0x0 after reboot proble)

apt-get install libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-pulseaudio python3.5-dev python3.5-dbus

install bluez

git clone https://github.com/gmsoft-tuxicoman/bt-audio cd bt-audio sudo python3 bt-audio.py

AmkSk commented 3 years ago

I've tried this approach, but the sound quality seems a bit worse with bt-audio. Anyone else knows how to lower the latency?

nomiddlename commented 1 year ago

I managed to reduce the latency on my RPi4 to an acceptable level for watching videos (the mouth movements sync with the audio) by tweaking the aplay parameters in config.ini:

play_command = aplay --period-time=80000 --buffer-time=160000 -f cd -

The downside is that I now see a few 'underrun' messages in the logs, but it doesn't seem to affect the sound quality.