Rhasspy offline voice assistant toolkit

I need help
Try to train Rhasspy and have an error.
I use this youtube channel for help and files: Local Voice Control With Home Assistant Just Got Easier! - YouTube
and this is what I got



Please let me know what I am doing wrong and if I have to reinstall my profile , how to do this?
TY

The three red lines of the second screenshot look like it should be

mkdir -p /share/rhasspy/profiles/en/slot_programs/hass/

TY
I will try. I pause playing with Rhasspy for now, have othe project to finish.
Will come back to this after I will be done. Thank you again

8 Likes

F***ing excellent!!!

4 Likes

Agreed…great news. Hopefully I can revisit this next year after a few HA updates and get this going.

1 Like

Wow, nice christmas gift !!!

1 Like

So what happened to Mycroft?

I’ve enjoyed working with the people at Mycroft, but it was hard to say no to a job offer to work full time on my first love (Rhasspy) :heart:

4 Likes

Excellent news!

1 Like

I’m trying to set up a PS3 Eye microphone in Rhasspy (Home Assistant addon) and have two problems:

  1. Microphone only starts transmitting audio to rhasspy if I execute in HA console (in web ui):
    ha audio default input --name "alsa_input..."
    I found this way here. But for me it only works until reboot.

  2. The microphone does not hear well and to make it more sensitive, as I understand it, I need to configure asound.conf. But I don’t know where to place it. I tried creating it in all possible places:

  • /etc/asound.conf
  • ${HOME}/.asoundrc
  • /usr/share/hassio/audio/asound
  • asoundrc input string in addon config
pcm.jack {
  type hw
  card ALSA
}

pcm.array {
  type hw
  card CameraB409241
}

pcm.softvol {
  type softvol
  slave.pcm "jack"
  control {
    name Master
    card 0
  }
}
pcm.cap {
  type plug
  slave.pcm "array"
  slave.channels 4
  ttable {
    0.0 15.0
    1.1 15.0
  }
}
pcm.!default {
    type asym
    playback.pcm "plug:softvol"
    capture.pcm {
      type plug
      slave.pcm "cap"
    }
}

But it either does nothing or it breaks the sound in Rhasspy. I need help.

I have a different kind of problem… After I installed Rhasspy I only put 1 switch and 1 light in the slots and the buttons on my HA are now gone…
Anyone have any idea why that happened?

Capture

To the right of the Light should be a button for a Fan but it’s no longer appearing since installing Rhasspy… The fan was put in as a switch… the light associated with it is the same…button is now gone.

I found a way to run Rhasspy in a docker image with Home Assistant Supervised.

You can check the operation of the microphone and speaker with the following commands:

arecord -d 5 -D plughw:1,0 test.wav
aplay -D plughw:2,0 test.wav

By specifying instead of plughw:x,x devices of your host system, looking at their commands arecord -l and aplay -l.

The problem is that the host’s audio devices are busy with the Home Assistant’s audio system. This issue is reported here: https://github.com/home-assistant/plugin-audio/issues/12
I used the solution from the penultimate post.

Once the microphone and speaker are available, /etc/asound.conf can be configured. I have it set up like this (I use PS3 eye):

pcm.array {
 type hw
 card CameraB409241 # microphone device name
}

pcm.array_gain {
    type softvol
    slave.pcm "array"
    control {
      name "PSEye"
      count 2
      card 0
    }
    min_dB -5.0
    max_dB 30.0
}

pcm.cap {
  type plug
  slave.pcm "array_gain"
  slave.channels 4
  ttable {
    0.0 15.0
    1.1 15.0
  }
}

pcm.speaker {
  type plug
  slave {
    pcm {
        type hw
        card "KTUSBAUDIO" # speaker device name
        device 0
    }
   }
}

pcm.!default {
  type asym
  capture.pcm "cap"
  playback.pcm "speaker"
}

ctl.!default {
    type hw
    card 0
}

The path to asound.conf must be specified when running the docker image:

docker run -d -p 12101:12101 --name rhasspy --restart unless-stopped -v "$HOME/.config/rhasspy/profiles:/profiles" -v "/etc/localtime:/etc/localtime:ro" -v "/etc/asound.conf:/etc/asound.conf" --device /dev/snd:/dev/snd rhasspy/rhasspy:2.5.11 --user-profiles /profiles --profile en

With this configuration, everything works well. The only problem is, when the host is rebooted, the microphone becomes unavailable and its cable needs to be re-plugged. If anyone knows how this can be solved, I will be glad to advice.

1 Like

Has anyone else noticed that since Home Assistant 2023.2.x some of the built-in intents don’t give spoken feedback through Rhasspy anymore? For me,

  • HassTurnOn
  • HassTurnOff
  • HassToggle
  • HassLightSet

are broken in that sense, whereas

  • HassOpenCover
  • HassCloseCover

are still working fine. The intent scripts I’ve written myself still work as intended too.

Rhasspy 3 developer preview is now available: Rhasspy 3 Developer Preview - Announcements - Rhasspy Voice Assistant

1 Like

@synesthesiam just curious, is there any point in me continuing to play with Rhasspy, or should I just wait for HA’s year of the voice to mature?

Playing with Rhasspy will get you “early access” to some things. For example, the Rhasspy 3 add-on already does local STT with Whisper, uses Assist, and does local TTS too. If you already have some Raspberry Pi’s for satellites and free, this might be the way to go for now.

I don’t know exactly what the HA side of things is going to end up like, but you can bet it will be more polished and streamlined than Rhasspy :stuck_out_tongue:

3 Likes

Does anyone have a way to configure Rhasspy to send all audio playing to Sonos ?

When I set up Rhasspy I went the the automation route instead of the intent route and then I use automation like this:

id: Rhasspy Say the Date
alias: Rhasspy Say the Date
trigger:
  platform: event
  event_type: rhasspy_GetDate
action:
- service: script.sonos_say
  data:
    sonos_entity: media_player.living_room
    volume: 0.5
    message: " It is {{ states.sensor.date.state }}   "
1 Like

Has similar issue, solved it by omitting the content type, not sending binary data and pointing rhasspy to its local media folder path.
curl -X POST 'http://10.0.0.X:12101/api/play-wav' -d '/profiles/media/alerts/audio.wav'