Bluetooth speaker not working

Hello all,

i wanted to integrate tts and i bought a bluetooth speaker for it. I connected it to my raspberry pi 4 and i can play a wave file via “aplay test.wav”. In rhasppy i selected aplay for audio playing and left it on default. Unfortunately no sound comes ;(

when i try to play the audio in the docker container it says “ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM bluealsa”.

Does the docker container not recognize my bluetooth connection? Can anyone help me? Am i missing something?

I haven’t tried to access a Bluetooth speaker in a Docker container yet, but I know that for other Bluetooth devices you need to add capabilities. In the Docker Compose file for bt-mqtt-gateway that I’m using, I have these lines added in my container’s definition:

    cap_add:
      - NET_ADMIN
      - SYS_ADMIN
    # The Docker host should have working Bluetooth
    network_mode: host

So I guess you could try the same for your Rhasspy container.

If you’re using a single Docker command, you should start the container with:

docker run -d --cap-add=SYS_ADMIN --cap-add=NET_ADMIN --net=host ...

Note that this starts the container with host networking. I needed this for my Bluetooth applications, but I’m not sure you need it for Bluetooth audio, so maybe first try with just the --cap-add=SYS_ADMIN argument.

Hello!
Did you solve your problem?

Today I also mooved to use BT speakers with RPi4, also with ALSA, also playing from Rassbian, but not sending the signal to the BT speakers. So, browsing the web in a search for the answers I came accross your post.

I did add the capabilities as was suggested - but it did not help. In my .asoundrc and asound,conf files I explicitelly indicated BT speakes as default and sysdefault. So, aplay test.wav plays through the BT speakers with as default ones. But when in Rhasspy - the TTS directs sound to the 3.5output and plays it though the wired speakers.

My guess is that Rhasspy uses some other config to read - do you have any idea by now which one?

Thanks!

2 Likes

hey,
sorry for the late feedback. Unfortunately the whole thing did not work properly. I have now run rhasspy through the Virtual Environment and it works directly with bluetooth without problems.