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.
- A 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)
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.
Install MATRIX Kernel Modules
curl -sSL https://get.docker.com | sh
sudo usermod -a -G docker $USER
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.list
sudo apt-get update
sudo apt-get upgrade
Install Kernel Modules.
sudo apt install matrixio-kernel-modules
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
Rhasspy Web Interface
docker run -d -p 12101:12101 \
--restart unless-stopped \
-v "$HOME/.config/rhasspy/profiles:/profiles" \
--device /dev/snd:/dev/snd \
--user-profiles /profiles \
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.
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.
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.
Rhasspy should now be fully configured on your Raspberry Pi!
- Plug in an audio jack speaker into the Pi (optional)
- Open the Log tab in the Rhasspy web interface
Say "Porcupine, what time is it?" and the logs will populate with the wake word and query being heard.
To learn more about how to configure & create skills for your Rhasspy Assistant, be sure to visit the project's official documentation.
Follow this guide to create custom intents.