I have been working in the field of home automation in my spare time for about a year now. Privacy was important to me right from the beginning - after all, I have been trying for some time to bring various services "back into my hands". For example, iCloud is no longer used to synchronize calendars, contacts, etc. Some people may call that paranoia.
Another important component in the whole setup should be voice control. Since I grew up with StarTrek, I have always been fascinated by the naturalness of controlling a giant spaceship by voice or querying the computer for any information - no matter where.
Last summer I was looking for an open source solution for voice control and became aware of Snips. I was immediately thrilled with the idea of running the software on one of my various Raspberry PIs. A first test went surprisingly well. But disillusionment began when I realized that the German language was not yet supported on the edge device, but only when using Google's ASR online service. The German language is a must-have for our family household with my kiddies.
That's why I postponed the use of Snips at first... a short time later Christmas was just around the corner... and at an unbeatable price of about 35€ I threw all concerns overboard and bought an Amazon Echo Dot in the pre-Christmas time. My eldest son was happy to finally be able to access his audio books from Audible on his own and my youngest daughter faced the Echo device and demanded "Alexa, turn up/down the volume". Everyone was happy - if there weren't reports (or just rumors?) about (un)intentional data abuse to read over and over again.

The blog post would not have this title nor would it even exist if I hadn't seen that Snips now supports the German language on the device.

A lot has happened since my first test of Snips. And so there is now a command line tool called SAM (Snips Assistant Manager), which makes working with snips - at least on a Raspberry Pi as a target platform - much easier. Let's go! See how quickly you can set up your private voice assistant on a Raspberry Pi.

Bill of material

You don't need many things to get started with Snips. Maybe you already have all of these in a drawer. I have used the following parts:

  • Raspberry Pi 3
  • USB microphone (PS3 Eye, since it already contains 4-Mic-Array)
  • Bluetooth speaker (connected using audio jack)
  • adequate power supply
  • SD card

Prepare the Raspberry Pi

Download the latest Rasbian image and use a tool like Etcher to flash this image onto your SD card. Before we boot this SD card, we want to set up the Wifi and enable access via SSH. If you want to stay with a network cable (Ethernet), you can simply skip the Wifi configuration.

Wifi

Add the following file wpa_supplicant.conf at the root of the boot volume of the SD card and do not forget to update the ssid and psk keys:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
    ssid="<Your wifi network name>"
    psk="<Your wifi network password>"
}

SSH

To enable SSH access to the Raspberry Pi simply add the empty file ssh to the root of the boot volume of the SD card.

Insert the SD card into the Raspberry Pi and boot it.

Install the Snips Voice Platform

Installing Snips with the command line tool SAM has never been easier. Follow the instructions in the screencast below and you will have completed a basic installation of Snips in a few minutes. Default login/password combination is pi/raspberry.

Despite the fact, that there are some services not running at the end of the screencast, your basic installation has been successful. The error messages for non-running services are due to the fact that no assistent and no skills have yet been deployed. This will be our next step.

Create and Deploy your first Snips Voice Assistant

Open the Snips Console and register your account. Wait! I have to register before I can use Snips - what about privacy? Stay calm and read the note below.

Snips is fundamentally different from other voice assistants, including Amazon Alexa, Google Assistant, and Siri from Apple. While all major vendors stream the voice input to their respective cloud services for analysis, Snips provides voice analysis on the device it is running on. This is the only way to ensure the users privacy. Before you can use your Snips voice assistant, you have to create it using the Snips Console by adding the desired skills and then launching the assistant on the device. Your usage behavior is therefore not known to anyone but you. In the time of writing you can even add your personal hot-word to activate the assistant. On the one hand you achieve a customization of your assistant (Amazon Alexa currently supports only 4-5 fixed hotwords). On the other hand, your voice is also part of your privacy. So instead of uploading your voice sample to services like Snowboy (what is cool anyway!), you can create the customized hotword detection on your device too. This is called: Privacy by Design!

So follow the instructions in the following screencast to create your very first voice assistant and to add the very simple HelloWorld skill.

In the time of writing this blog post the HellWorld skill is only available in the German Skill Store. Either you create a German assistant too or you try another skill from the Skill Store of your chosen language. The HelloWorld skill will soon support other languages as well.

Now it's time to deploy the created assistant onto the Raspberry Pi. So we go back to the console and utilize SAM cli again to deploy the assistant.

Awesome stuff! I hope you have heard something in your local setup too?! Then you were successful!

If, contrary to my expectations, you have encountered problems with the installation, then I recommend you to read the Snips documentation - or even better - to join the Snips Community Chat.

This example should suffice for a first introduction to the Snips platform. In an upcoming blog post we will look at further details and will try them. Until then have fun and keep your voice in private.

Lars Martin

I have been developing software for 20 years - mostly on the basis of the JVM. In the recent past I've been doing a methamorphosis towards polyglot projects. In my spare time, I enjoy Smart Home and Home Automation.

Blog Comments powered by Disqus.