Rhasspy Voice Assistant on MATRIX Voice and MATRIX Creator

Learn how to install the Rhasspy offline voice assistant, through a simple Docker image!

Required Hardware

Before getting started, let’s review what you’ll need.

  • Raspberry Pi 3 or 4.
  • MATRIX Voice or MATRIX Creator – Raspberry Pi does not have a built-in microphone, the MATRIX Voice & MATRIX Creator each have an 8 mic array – Buy MATRIX Voice or Buy MATRIX Creator.
  • Micro-USB power adapter for Raspberry Pi.
  • Micro SD Card (Minimum 8 GB) – An operating system is required to get started. You can download Raspbian and use the guides for Mac OS, Linux. and Windows on the Raspberry Pi website.
  • USB Keyboard & Mouse, and an external HDMI Monitor – we also recommend having a USB keyboard and mouse as well as an HDMI monitor handy. You can also use the Raspberry Pi remotely, see this guide from Google.
  • Internet connection (Ethernet or WiFi)

Let’s Get Started

The scope of this guide will only cover how to set up the Rhasspy voice assistant with a MATRIX Device. Skill-building will be in a separate guide.

If you haven’t already, be sure to set up your Raspberry Pi with your MATRIX Device.

Once done, ensure you enable SSH on your Raspberry Pi. All commands below are meant to be run on your Pi.

Install Docker

After installing Docker, a reboot will be needed to add the pi user to the Docker user group.

curl -sSL https://get.docker.com | shsudo usermod -a -G docker $USER

Install MATRIX Kernel Modules

In order to use the microphones of your MATRIX device, We’ll install the kernel modules to enable an ALSA interface for the mics.

Update packages and add MATRIX repository.

curl https://apt.matrix.one/doc/apt-key.gpg | sudo apt-key add -echo "deb https://apt.matrix.one/raspbian $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/matrixlabs.listsudo apt-get updatesudo apt-get upgrade

Reboot.

sudo reboot

Install Kernel Modules.

sudo apt install matrixio-kernel-modules

Another reboot!

sudo reboot

Start the Rhasspy Voice Assistant

Download and run the Rhasspy image (5+ minutes). This also creates a configuration folder for your assistant in ~/.config/rhasspy

docker run -d -p 12101:12101 \      --restart unless-stopped \      -v "$HOME/.config/rhasspy/profiles:/profiles" \      --device /dev/snd:/dev/snd \      synesthesiam/rhasspy-server:latest \      --user-profiles /profiles \      --profile en

Rhasspy Web Interface

With your assistant now running. You can configure your assistant by going to http://YOUR_PI_IP:12101

Select DownloadNow on the prompt you’re given. Then wait to be notified by Rhasspy when it is done so that it restarts to apply the changes.

Although you haven’t customized your assistant, click the Train button, wait to be notified of completion by Rhasspy (green dialog box on the bottom left), & reload the page to test the assistant in the following steps.

Model Training Button

Model Training Button

Select the MATRIX Microphones

Go to the Settings tab, scroll down to Audio Recording, and select Use arecord directly (ALSA) with the device:

hw:CARD=MATRIXIOSOUND, DEV=0: Direct hardware device without any conversions

Be sure to save your settings and wait till the assistant restarts!

If you go back to settings, there is visual bug that will look like your microphone choice was ignored. Just assume that it works.

Set Porcupine as the Wake Word Engine

By default, Rhasspy will not use a wake word, but it has multiple options to pick from. We’ll be using Porcupine because of the performance, according to the Rhasspy Docs.

Go back into the settings menu, scroll down to WakeWord, select Porcupine, and save.

A prompt to download the wake word configurations will pop up. Be sure to download them! Wait until the download finishes and your assistant restarts to move on.

Source: Rhasspy Voice Assistant on MATRIX Voice and MATRIX Creator

Scroll to Top