Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to make the bluetooth headset work in Rhasspy Assistant? #323

Open
DivanX10 opened this issue Mar 12, 2023 · 4 comments
Open

How to make the bluetooth headset work in Rhasspy Assistant? #323

DivanX10 opened this issue Mar 12, 2023 · 4 comments

Comments

@DivanX10
Copy link

I need your help. Please help me make the bluetooth headset work in the Rhasspy Assistant addon. I tried different options and i never managed to get the bluetooth headset in Chess Assistant to work. Although the bluetooth headset works fine in Debian 11.6, you can activate the HSP/HFP profile and both the microphone and audio playback in the speaker will work. Here i detail everything расписал what I did and how. The only solution i came up with was to buy a radio microphone and connect it to the 3.5 mini jack connector, and i took the Mi Portable Bluetooth Speaker BHR4802GL to output the sound. But this is not what i would like to have, but i would like a Bluetooth wireless speaker with a microphone to be able to fully work in the Rhasspy Assistant addon

Here's what it looks like

The microphone radio itself
image

Radio Microphone and Mi Portable Bluetooth Speaker BHR4802GL
image

In the addon settings, Rhasspy Assistant specified a built-in sound card for the microphone, and for Bluetooth Speaker specified Mi Portable Bluetooth Speaker
image

I couldn't get it to work through docker by using this option. I took an example from here

version: "3.8"
services:
  rhasspy:
    image: rhasspy/rhasspy
    container_name: rhasspy
    privileged: true
    network_mode: bridge
    restart: unless-stopped #always
    ports:
      - 12101:12101 #http
      - 12183:12183 #mqtt
    devices:
      - /dev/snd/*
    volumes:
      - /home/docker/rhasspy/profiles:/profiles
      - /etc/localtime:/etc/localtime:ro
      - /home/docker/rhasspy/.config/pulse/cookie:/home/rhasspy/.config/pulse/cookie
      - /run/user/1000/pulse:/run/user/1000/pulse
      - /home/docker/rhasspy/pulseaudio:/etc/pulse/client.conf.d
    command: --user-profiles /profiles --profile ru
    environment:
      - PULSE_SERVER=unix:/run/user/1000/pulse/native
      - PULSE_RUNTIME_PATH=/run/user/1000/pulse
@fluidvoice
Copy link

shouldn't you post this in the Rhasspy forum instead of opening an issue?

@DivanX10
Copy link
Author

DivanX10 commented Mar 13, 2023

shouldn't you post this in the Rhasspy forum instead of opening an issue?

I brought up the topic on the Rhasspy, Home Assistant forum, created an interview with the author of the Rhasspy Assistant addon and there is no answer to whom else to contact?

  1. https://community.rhasspy.org/t/how-to-use-bluetooth-speaker-mic-with-rhasspy/3975/14?u=divanx10
  2. How do I add a bluetooth speaker or headset to Rhasspy Assistant? hassio-addons#20
  3. https://community.home-assistant.io/t/how-to-transfer-a-bluetooth-headset-microphone-from-debian-11-to-home-assistant-rhasspy-assistant/543630/4
  4. https://community.home-assistant.io/t/should-i-go-there-whole-house-audio-and-then-some/39584/120?u=divanx10

I'm still struggling to solve the problem myself, Googling various options, for example, I found this option on the assembly bluez-alsa, but there are certain problems with installing fdk packages-aac, openaptx, spandsp. Having installed these packages, it seemed that it would be possible to build bluez-alsa, but it was not there.

sudo apt-get install -y libfdk-aac-dev libsbc-dev openaptx-utils libspandsp-dev libtiff5-dev libldacbt-abr-dev libldacbt-enc-dev readline-common libbsd-dev ncurses-base libdbus-1-dev

I look for example at such a solution [Re Speaker USB Mic Array](https://wiki.seeedstudio.com/Re Speaker-USB-Mic-Array/), but this is a wired solution, not bluetooth. Here, rather, the problem is in Rhasspy itself, since it works with ALSA, and for Rhasspy Assistant in Home Assistant, they made audio output via pulseaudio, but did not add the ability to work with a microphone via bluetooth

@synesthesiam
Copy link
Contributor

Do you think this is an issue with Rhasspy or HA? I appreciate all of the work you've put in; there's a lot of detail. But I can't tell where exactly it would be possible to change Rhasspy so it can see the Bluetooth mic. Rhasspy just uses the underlying ALSA or PortAudio libraries :/

@DivanX10
Copy link
Author

DivanX10 commented Mar 14, 2023

Do you think this is an issue with Rhasspy or HA? I appreciate all of the work you've put in; there's a lot of detail. But I can't tell where exactly it would be possible to change Rhasspy so it can see the Bluetooth mic. Rhasspy just uses the underlying ALSA or PortAudio libraries :/

Thanks. This is a common problem. I'll try to explain it to you. I apologize for my poor English, as I use an online translator.

1)In Debian version 10.12, the sound on the bluetooth headset works, but the microphone does not, since the HSP/HFP profile does not work in 10.12, only the A2DP profile is available. Therefore, only sound works in rhasspy, and the microphone does not work. The rhasspy_2.5.10_amd64.deb assembly referenced by the rhasspy documentation is installed successfully and rhasspy runs without problems. In rhasspy, only the sound on the bluetooth headset works.

2)In Debian version 11.6, the HSP/HFP profile is available and the sound and microphone work on the bluetooth headset. The rhasspy_2.5.10_amd64.deb build is not installed on Debian version 11.6, as it is adapted for Debian version 10.12. To install rhasspy_2.5.10_amd64.deb, you need to rebuild the package. I have described this in detail here. By installing rhasspy_2.5.10_amd64.deb on Debian 11.6, rhasspy starts, but the sound and microphone do not work. I assume that replacing the package from libgfortran4 to libgfortran5 is not enough, perhaps there are dependent packages that affect the sound to work in rhasspy.

3)The Rhasspy Assistant addon for Home Assistant is built on the Debian version 10.10 image, where the HSP/HFP profile is also unavailable, so only the audio output works, the microphone will not work due to the broken HSP/HFP profile

Rhasspy is built from old packages and rhasspy can run on Debian version 10.10 with sound working on a bluetooth headset, but the microphone will not work due to the HSP/HFP profile not working. Is it possible to rebuild rhasspy so that rhasspy runs on Debian 11.6 with a working HSP/HFP profile?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants