Ubuntu, docker and bluetooth audio - alsa or pulseaudio?

Hi! I’m in desperate need for help about how to set up bluetooth audio in docker as I feel stuck, please help me out! I have an Ubuntu 22 PC (used as a server, so no monitor/GUI is used, only CLI) and want to run rhasspy with docker. What makes it difficult, I don’t have a sound card, but want to use a Jabra bluetooth speaker.

I have a bluetooth dongle, and pairing the Jabra is done on the host. I didn’t have any luck yet playing any sound with pulseaudio on the host (I’m also confused with how pulseaudio should be there and running as a daemon and how authorization should work), but I was able to set up a bluealsa config and play sound with aplay, so at least I can say that bluetooth connectivity is indeed fine.

Simply mounting /dev/snd to the rhasspy container is definitely not enough. What I’m not sure is whether I should just try to use ALSA on the host node and in docker as well, but if so then should I also expose my bluealsa config to the docker (where I had trouble installing bluealsa), or rather just use pulseaudio in docker, or rather make it use pulseaudio of the host.

In short, I can’t figure out how these alsa, pulseaudio, bluetooth and docker should be tied together. I’m a bit lost and stuck and even an advice on what the setup should be, to go into the right direction could help a lot.

Thanks a lot in advance!

Hi Friend,

I have Ubuntu in a Dell PC like you and I am trying to install a rhasspy whisper docker with no success.

The docker doesn’t start properly.

Could you share your docker composer please ? Thanks you.

This is mine

openwakeword:
container_name: openwakeword
image: rhasspy/wyoming-openwakeword:latest
restart: unless-stopped
ports:
- “10400:10400”

whisper:
container_name: whisper
command: --model small --language en
#command: --model medium --language en
image: rhasspy/wyoming-whisper:latest
volumes:
- /opt/whisper/data/:/data
environment:
- TZ=America/New_York
restart: unless-stopped
ports:
- “10300:10300”

piper:
image: rhasspy/wyoming-piper:latest
container_name: piper
restart: unless-stopped
ports:
- “10200:10200”
volumes:
- ./wyoming:/data
command: [“–voice”, “en_US-lessac-medium”]