Introduction: Build Google Assistant on Raspberry Pi With ReSpeaker Mic Array

About: Howdy, we are application engineers in Seeed. Sharing projects with maker community is awesome. Hope you like it XD Seeed is the IoT hardware enabler providing services that empower IoT developers to swiftly …


With ReSpeaker Mic Array, now we can build Google Assistant on Raspberry Pi !!!

Hotword detection(means that you can directly talk to it from 2 meters away), cool LEDs(diy) and easy installation(no jump wire need and more portable), it is worthy for you to make one for yourself. Own your own Artificial intelligence assistant from now on:)

Step 1: What We Need

Raspberry Pi(with network connected) *1
Respeaker Mic Array with audio jack *1

sd card with raspberry pi image *1

earphone or speaker with 3.5mm audio cable *1

usb cable *2

PC or Mac

Step 2: Install Google Assistant Library on Your Raspberry Pi

The first step we need to do is installing the Google Assistant Library and environment on our Raspberry Pi. Of course Google has an official guide, please click here to see it:

This step is a bit tough, so please be patient. If you have any questions, please search or post an issue here:

After the first step, you should be able to use “OK Google” by running the demo.

Step 3: Download Our GitHub

At this step, you need to download our GitHub:

git clone

cd mic_array

Step 4: Test

1. Run to control the pixel ring of the Mic Array through USB HID. After running this, ReSpeaker Mic Array will start to blink.

sudo pip install pyusb
sudo python

If you don't want to access USB device with sudo, add a udev .rules file to /etc/udev/rules.d:

echo 'SUBSYSTEM=="usb", MODE="0666"' | sudo tee -a /etc/udev/rules.d/60-usb.rules
sudo udevadm control -R # then re-plug the usb device

2. Read 8 channels audio from the Mic Array and estimate sound's DOA. Then the LEDs on Mic Array will show the direction of the sounds.

sudo apt-get install python-numpy    # or pip install numpy

3. Do VAD and then estimate DOA. Then the LEDs on Mic Array will show the direction of the sounds, too.

sudo pip install webrtcvad

4. Do KWS and then estimate DOA.

Get snowboy work and run python Then you should say “alexa” to Mic Array to wake it up, if you sound is detected, the LEDs will show the direction of the sounds.

git submodule init
git submodule update
cd snowboy/swig/Python
sudo apt-get install python-dev libatlas-base-dev swig # requiremetns to compile snowboy
echo 'from snowboydetect import *' > # create for a python module
cd ../../.. # chang to the root directory of the repository
ln -s snowboy/swig/Python snowboydetectpython

Step 5: Run Google Assistant

After step3, it is time to run Google Assistant now. Don’t forget to activate the Python virtual environment you configured just now. And please make sure your raspberry pi is able to visit

then run:


Say “OK Google” or “Hey Google” to wake it up and ask it anything you want, just as the video. Enjoy it!!