Rhasspy offline voice assistant toolkit

Installing the Hass.io add-on from the synesthesiam repo should automatically download/install the profiles for all of the supported languages during the Docker build process. Every language should have its own profile directory under profiles, like profiles/en, profiles/nl, etc.

All of the files you mentioned except espeak_phonemes.txt and custom_words.txt are generated during the training process. custom_words.txt is where you add your own pronunciations outside of base_dictionary.txt.

Now espeak_phonemes.txt is where I really need help. This is very language specific. It maps the pocketsphinx phonemes (from the table) to what eSpeak uses for pronouncing words. This is only useful when adding custom words, since it helps you hear how Rhasspy expects you to pronounce a word. We can figure this out later – after we get past this initial hump of getting everything installed and running.

Again, thank you for your help and patience.

I did it that way but only had the en profile available in the webinterface. Also when I changed the configuration to default_profile": "nl" I got errors that some things were not found and the add-on crashed.

I read somewhere on Github to clone the repo locally, so I assumed this was the way to do it for languages other then English.

Together we will figure it out :blush:

I see what happened now. I had LANGUAGES in the Dockerfile set to just en. Whoops. It’s set to all the languages now!

1 Like

My confusion is actually getting worse now.

Are you telling me to install docker or the docker client version on my Pi?
“I think the easiest way going forward for the moment would be to install Docker on your Pi, but then use run-venv.sh as is.”

But then you say the docker client version is actually not going to work on the Pi?

“Docker client image of Rhasspy is only supported on amd64 machines”

Am I still supposed to use the ‘create_venv.sh’-script to install anything?

:man_shrugging:

rhasspy-server:
image: synesthesiam/rhasspy-server:amd64
container_name: rhasspy-server
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- RHASSPY_PROFILES=/profiles
-$HOME/.rhasspy/profiles:/profiles
-device /dev/snd:/dev/snd
-privileged
ports:
- 12101:12101

This is a docker-compose
when i run sudo docker-compose up -d error device / dev / snd: / dev / snd

Try just /dev/snd:/dev/snd without the device. I think privileged is also its own section, something like privileged: true.

Let’s see if I can make it worse :slight_smile:

I meant to just install the Docker program itself. Rhasspy needs some external tools to run, which can either be installed or run as individual little Docker images.

I just updated the create-venv.sh script to be a little smarter. If it finds docker, it goes ahead and uses the Docker images for all of the external tools. Otherwise, it goes out to Internet and installs all of the tools locally. Please give it a try and let me know how it goes.

One last thing: are you running this on Raspbian?

Yup, running Raspian :+1:

Will try to set it up on my ‘spare’ RPi3 tomorrow, hope the microphone in my Logitech USB camera will work :grin:

Thanks again for answering all my silly questions.

I love docker-compose
I follow your instructions then you this error
this is my configuration
rhasspy-server:
image: synesthesia / rhasspy-server: amd64
container_name: rhasspy-server
restart: always
volumes:
–var/run/docker.sock:/var/run/docker.sock
- RHASSPY_PROFILES = / profiles
- $ HOME / .rhasspy / profiles: / profiles
- privileged: true
- / dev / snd: / dev / snd
- / home / caohoa / config: / config
ports:
- 12101: 12101
ERROR: The Compose file ‘./
/docker-compose.yml’ is invalid because:
services.rhasspy-server.environment contains {“privileged”: true}, mĂ  lĂ  một kiểu khĂŽng hợp lệ, nĂł nĂȘn lĂ  một chuỗi

I have updated and configured docker-compose
Successful but error later

Looks like you’re close to getting this working! In your Settings, I see that I must have left in my Rhasspy client/server configuration accidentally (pumpkin.lan is my home server). You should probably set it to “Do speech recognition on this device” (also set “Do intent recognition on this device”).

For the aplay error, please try the Download button instead of Pronounce. It will give you a WAV file instead of trying to play it out of the speakers. Docker seems very hard to configure for playing/recording sound. That’s what the /dev/snd and privileged settings are for, but they don’t seem to work so well with PulseAudio (only ALSA).

Command ‘[‘aplay’, ‘-t’, ‘wav’, ‘/tmp/tmpkndjpi4j.wav’]’ returned non-zero exit status 1.
I still have this error
and not for equipment selection
Yesterday I also saw rhasspy reading and speaking

Are you running this on a Linux machine with alsa-utils installed and a sound card? If not, it will fail to play through the speakers.

In either case, please try the Download button next to Pronounce. It will just download the WAV file so you can play in your local machine.

I’m running on intel nuc and installing ubuntu 18.4

OK, my guess is that this is an issue with Docker and /dev/snd. If you can, please take a look at the log in the Rhasspy Docker container and see if there’s more information around the aplay error.

Can you post the docker-compose configuration you got to work also?

Lastly, can you verify that running aplay some-file.wav works in a terminal on your NUC? Replace some-file.wav with the name of any WAV file you have.

rhasspy-server:
image: synesthesiam/rhasspy-server:amd64
container_name: rhasspy-server
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- RHASSPY_PROFILES=/profiles
- $HOME/.rhasspy/profiles:/profiles
- /privileged
- /dev/snd:/dev/snd
- /opt/config:/config
ports:
- 12101:12101
This is my configuration in docker-compose

Try this:

rhasspy-server:
    image: synesthesiam/rhasspy-server:amd64
    container_name: rhasspy-server
    restart: always
    privileged: true
    volumes:
        - /var/run/docker.sock:/var/run/docker.sock
        - $HOME/.rhasspy/profiles:/profiles
        - /dev/snd:/dev/snd
        - /opt/config:/config
    environment:
        - RHASSPY_PROFILES=/profiles
    ports:
        - 12101:12101

ok i will try always