I’ve read a bunch of articles about bluetooth and docker. I still don’t understand what is going on.
When I use a USB headset, everthing works great.
When I connect my Bluetooth headset, from linux cmd line, I can record and play using arecord and aplay. To play on my headset I use: aplay -D bluealsa:DEV=41:42:13:CF:BD:94 t1.wav
When I try to play from with with Rhasspy I get:
AudioServerException: Command ‘[‘aplay’, ‘-q’, ‘-D’, ‘bluealsa:DEV=41:42:13:CF:BD:94’]’ returned non-zero exit status 1.
And in the docker-compose window I get:
rhasspy | [ERROR:2022-07-25 19:55:25,338] rhasspyserver_hermes: AudioPlayError(error=“Command ‘[‘aplay’, ‘-q’, ‘-D’, ‘bluealsa:DEV=41:42:13:CF:BD:94’]’ returned non-zero exit status 1.”, site_id=‘default’, context=‘5d2f63e8-bbc6-4258-a658-54057a3e0fce’, session_id=‘5d2f63e8-bbc6-4258-a658-54057a3e0fce’)
rhasspy | [ERROR:2022-07-25 19:55:25,340] rhasspyserver_hermes: Command ‘[‘aplay’, ‘-q’, ‘-D’, ‘bluealsa:DEV=41:42:13:CF:BD:94’]’ returned non-zero exit status 1.
rhasspy | Traceback (most recent call last):
rhasspy | File “/usr/lib/rhasspy/.venv/lib/python3.7/site-packages/quart/app.py”, line 1821, in full_dispatch_request
rhasspy | result = await self.dispatch_request(request_context)
rhasspy | File “/usr/lib/rhasspy/.venv/lib/python3.7/site-packages/quart/app.py”, line 1869, in dispatch_request
rhasspy | return await handler(**request_.view_args)
rhasspy | File “/usr/lib/rhasspy/rhasspy-server-hermes/rhasspyserver_hermes/main.py”, line 1699, in api_text_to_speech
rhasspy | results = await asyncio.gather(*aws)
rhasspy | File “/usr/lib/rhasspy/rhasspy-server-hermes/rhasspyserver_hermes/main.py”, line 1685, in speak
rhasspy | say_chars_per_second=say_chars_per_second,
rhasspy | File “/usr/lib/rhasspy/rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 632, in speak_sentence
rhasspy | raise AudioServerException(play_response.error)
rhasspy | rhasspyserver_hermes.AudioServerException: Command ‘[‘aplay’, ‘-q’, ‘-D’, ‘bluealsa:DEV=41:42:13:CF:BD:94’]’ returned non-zero exit status 1.