Rhasspy offline voice assistant toolkit

And what about this? Rhasspy offline voice assistant toolkit

I’m trying without success :frowning:

Well, I think you should wait for 2.5 which has the Dialogue Manager implemented.
You can read some of the preview docs here: https://community.rhasspy.org/t/documentation-preview-for-2-5/516

Something broke after upgrade to latest hass.io 106.x and latest hassio-audio #9 and Rhasspy-addon 2.4.19
First: Porcupine module didn’t load:

ERROR:PorcupineWakeListener:loading wake handle
Traceback (most recent call last):
File “/usr/share/rhasspy/rhasspy/wake.py”, line 852, in in_started
self.load_handle()
File “/usr/share/rhasspy/rhasspy/wake.py”, line 936, in load_handle
sensitivities=self.sensitivities,
File “/usr/share/rhasspy/porcupine.py”, line 117, in init
raise self._PICOVOICE_STATUS_TO_EXCEPTION[status](‘initialization failed’)

Second: ALSA cards not available from container:

aplay: main:788: audio open error: No such file or directory
ERROR:APlayAudioPlayer:on_receive
Traceback (most recent call last):
File “/usr/share/rhasspy/rhasspy/actor.py”, line 175, in on_receive
self._state_method(message, sender)
File “/usr/share/rhasspy/rhasspy/audio_player.py”, line 67, in in_started
self.play_file(message.wav_path)
File “/usr/share/rhasspy/rhasspy/audio_player.py”, line 90, in play_file
subprocess.run(aplay_cmd, check=True)
File “/usr/lib/python3.6/subprocess.py”, line 438, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command ‘[‘aplay’, ‘-q’, ‘-D’, ‘’, ‘/share/rhasspy/profiles/ru/beep_hi.wav’]’ returned non-zero exit status 1.

root@75f2ff60-rhasspy:/# ls -al /proc/asound/
total 0
drwxrwxrwt 2 root root 40 Mar 12 15:45 .
dr-xr-xr-x 273 root root 0 Mar 12 15:45 …
root@75f2ff60-rhasspy:/#

I had similar issues.
Porcupine appears to have updated their ppn files.
I redownloaded my “jarvis.ppn” and now it is working normally.

Try redownloading whatever porcupine file you were using - likely it was updated (mine was about 2 months ago).

The second issue I think I had as well… I rebuilt everything in my profile and then my sound device wasn’t saving to profile.json. I updated it manually and it started working.

Looks like the profile for sound device is not saving correctly.
I haven’t created an issue on github yet, but think both points are valid.

DeadEnd

Thank you for help!
Trying to use redownloaded porcupine “.ppn” files - the same issue. In my case - bumblebee_linux.ppn and jarvis_linux.ppn

The second issue - before upgrade I could see name of soundcard devices on Rhasspy-addon page. Now I can see - only “Built-in Audio Analog Stereo”. As far as i could understand - hassio-audio addon creates this device.

I’m having issues with the latest update and Respeaker 4mic.
I have the exact same problem as this.
Is there anyway to fix it?

I have migrated to docker container
Please check this thread https://community.rhasspy.org/t/hassio-addon-audio-faulure-after-upgrade-to-106-5/581/14

I’m running Rhasspy in Docker on a Raspberry Pi4, and getting it to communicate with Home Assistant in HassOS/Hassio on a separate Raspberry Pi3 device.

I’m trying to move a number of existing Home Assistant intent scripts that have been set up for Google Assistant via the DialogFlow integration across to Rhasspy. Accordingly, I have set up Rhasspy using Kaldi in open transcription mode to then send intents (rather than events) to Home Assistant.

However, to get this working fully I need to replicate a feature of DialogFlow which allows the sending of slots not explicitly named/referred to in the intent itself. To do this I need to parse the original transcribed speech.

I see from the Home Assistant Developer docs on intents that this does exist in the form of an input-text property of the homeassistant.helpers.intent.Intent class, but I can’t for the life of me work out how to access this property in scripts and automations on the Home Assistant side.

Am I missing something really obvious here? Thanks for any advice

I’m trying to setup Rhasspy as a hassio addon with a PS3 camera. It appears in the dropdown list in the addon settings but I can’t see it in the Rhasspy WebUI.
The following error shows up in the logs:

ERROR:DialogueManager:get_microphones
Traceback (most recent call last):
  File "/usr/share/rhasspy/rhasspy/dialogue.py", line 782, in handle_forward
    mics = recorder_class.get_microphones()
  File "/usr/share/rhasspy/rhasspy/audio_recorder.py", line 261, in get_microphones
    default_name = audio.get_default_input_device_info().get("name")
  File "/usr/local/lib/python3.6/dist-packages/pyaudio.py", line 949, in get_default_input_device_info
    device_index = pa.get_default_input_device()
OSError: No Default Input Device Available

Is this a config error or related to the audio problems I’m seeing around the forums since the latest updates?

Seems we need to install libasound2-plugins inside Rhasspy docker container. Thereafter it’s possible to set “pulse: PulseAudio Sound Server” as the Output Device and Output works as before!

This did not work for me.

Did you install libasound2-plugins inside container?

In my case looks like:

2 Likes

Oh, I didn’t see the “pulse” option in the “aplay” in Rhasspy the first time. Now I can see it.
Thanks you so much, the microphone is working again!

@synesthesiam could you add libasound2-plugins to the build of docker container? Seems it is necessary for latest hass.io

Is there a way to get 2.5 version? I would like to experiment with it - the githib only has until 2.4.19

It is not yet available as addon, but you can use a prerelease version.

Here is how:

1 Like

Hi,

I am trying to get started with Rhasspy but I am not getting either the speaker/mic to work, my setup is the following:


Raspberry Pi4 
Jabra SPEAK 410 USB
HassOS 3.2
Hassio 0.108.1
Rhasspy Hassio AddOn  2.4.19

When I go into SSH terminal and do ha hardware info I get the following for audio and input

audio:
  "0":
    devices:
    - chan_id: "0"
      chan_type: digital audio playback
    - chan_id: "0"
      chan_type: digital audio capture
    name: USB-Audio - Jabra SPEAK 410 USB
    type: USB

input:
- Jabra SPEAK 410 USB
- Jabra SPEAK 410 USB Consumer Control

Then In the hassio configuration I have

Config

user_dir: /share/rhasspy/profiles
profile: en
ssl: false
certfile: fullchain.pem
keyfile: privkey.pem
asoundrc: ''

Audio

Input -> Jabra Speak 410 USB Mono
Output -> Jabra Speak 410 USB Analog Stereo

I then went into the web interface, downloaded the english profile and click Train.

But when I go to speech and try to speak a sentence (hello world) I get the following in the logs

DEBUG:APlayAudioPlayer:['aplay', '-q']
ALSA lib dlmisc.c:254:(snd1_dlobj_cache_get) Cannot open shared library /usr/lib/arm-linux-gnueabihf/alsa-lib/libasound_module_pcm_pulse.so
aplay: main:788: audio open error: No such device or address
ERROR:APlayAudioPlayer:on_receive
Traceback (most recent call last):
  File "/usr/share/rhasspy/rhasspy/actor.py", line 175, in on_receive
    self._state_method(message, sender)
  File "/usr/share/rhasspy/rhasspy/audio_player.py", line 70, in in_started
    self.play_data(message.wav_data)
  File "/usr/share/rhasspy/rhasspy/audio_player.py", line 102, in play_data
    subprocess.run(aplay_cmd, input=wav_data, check=True)
  File "/usr/lib/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['aplay', '-q']' returned non-zero exit status 1.

When going to the console and doing aplay -L I get:

null
    Discard all samples (playback) or generate zero samples (capture)
default
    Default ALSA Output (Home Assistant PulseAudio Sound Server)

Then in the advanced tab I have the following

{
    "microphone": {
        "arecord": {
            "device": "null"
        },
        "system": "arecord"
    }
}

I also try playing around with

asoundrc , including the following in the Config section without luck either


  pcm.!default { type hw card 0 }
  ctl.!default { type hw card 0 }

I am really lost at this point, any help is greatly appreciated

Thanks
Claudio

Try to install libasound2-plugins inside rhasspy docker container. Rhasspy offline voice assistant toolkit

Thanks @nordeep!

By doing apt install --yes libasound2-plugins in the container it started working, however each time I restart the Rhasppy hassio addon I loose the libasound2-plugins installation and the settings stored for the speaker and mic.

How can I make the Rhasppy hassio addon install the libasound2-plugins each time it restarts ?

Thanks!

There are two options: 1. You can create local clone of the Rhasppy hassio addon and add libasound2-plugins package to container. 2. Ask @synesthesiam to add libasound2-plugins package to the official build :slightly_smiling_face:

1 Like