ReSpeaker Core 2.0

Based on the Rockchip RK3229, a quad-core ARM Cortex A7, running up to 1.5GHz, with 1GB RAM. The board features a six microphone array with speech algorithms. ReSpeaker Core v2.0 runs a GNU/Linux.
  1. 3.5mm Headphone jack: Output audio. You can plug active speakers or Headphones into this port

  2. USB OTG: This USB Port is used to connect to your computer via serial mode of putty (or other serial tools)

  3. USB Power Input: This port is used to provide power for ReSpeaker Core v2.0

  4. Speaker Jack: Output audio for passive speakers. Jst 2.0 Socket

  5. UART: You also can connect the ReSpeaker Core v2.0 with your computer via this UART port

  6. 8 Pins GPIO: General Purpose Input Output interface for extended applications

  7. SD Card Slot: To plug in micro-SD card

  8. eMMC: Embedded Multi Media Card. You can burn the image into eMMC, so that the ReSpeaker Core v2.0 can boot from the eMMC

  9. USB Host: You can plug USB device, such as USB mouse,USB keyboard and USB flash disk into ReSpeaker Core v2.0 via those two USB hosts

  10. Ethernet: Access to the Internet

  11. HDMI: Output video

  12. Bluetooth and Wi-Fi Antenna: The onboard Antenna is for WIFI and Bluetooth. Also we provide a interface for 2.4G Antenna or PCB Antenna

  13. Grove Socket: Grove Socket for digital or I2C.

Currently, the Sam CLI cannot be used to set up the ReSpeaker Core 2.0, so you will have to manually install assistants. Please scroll down to the bottom of this page to follow the installation instructions.

SdCard / eMMC

Download and flash the ReSpeaker with this image from the official ReSpeaker OneDrive folder.

Install Snips

Follow these install commands:

sudo apt-get update
sudo apt-get install -y dirmngr
sudo apt-get install -y apt-transport-https
sudo bash -c 'echo "deb https://raspbian.snips.ai/respeaker_iot stable main" > /etc/apt/sources.list.d/snips.list'
sudo apt-key adv --fetch-keys https://raspbian.snips.ai/531DD1A7B702B14D.pub
sudo apt-get update
sudo apt-get install -y snips-platform-voice
sudo apt-get install -y snips-platform-demo
sudo apt-get install -y snips-tts
sudo apt-get install -y snips-watch
sudo apt-get install -y snips-template snips-skill-server

PulseAudio Sound Configuration

The Respeaker core v2 is using pulsaudio. We need to allow the snips service user to access the pulse audio service:

sudo usermod -a -G pulse-access _snips

For a better sound experience you need to modify the default pulse audio daemon configuration:

sudo vi /etc/pulse/daemon.conf

This file need to contains the lines:

default-fragments = 5
default-fragment-size-msec = 2

Update the snips-audio-server service configuration file

sudo tee /lib/systemd/system/snips-audio-server.service > /dev/null <<EOS
[Unit]
Description=Snips Audio Server
After=network.target pulseaudio.service
[Service]
User=_snips
Group=_snips
ExecStart=/usr/bin/snips-audio-server
Restart=always
RestartSec=5
ExecStartPre=/usr/local/bin/wait_for_pulse_devices.sh
Environment="XDG_RUNTIME_DIR=/var/snips-audio-server"
[Install]
WantedBy=multi-user.target
EOS
sudo systemctl daemon-reload

Update the PulseAudio service configuration file:

sudo tee /lib/systemd/system/pulseaudio.service > /dev/null <<EOS
[Unit]
Description=PulseAudio Daemon
After=bluetooth.service
[Install]
WantedBy=multi-user.target
[Service]
Type=simple
PrivateTmp=true
Environment=HOME=/tmp/pulseaudio
ExecStart=/usr/bin/pulseaudio -v --daemonize=no --system --realtime=no --log-target=journal
ExecStop=/usr/bin/pulseaudio -k
Restart=always
RestartSec=2
EOS
sudo systemctl daemon-reload

Create the snips-audio-server runtime directory

sudo mkdir /var/snips-audio-server
sudo chown _snips:_snips /var/snips-audio-server

Create the snips-audio-server prestart script

sudo tee /usr/local/bin/wait_for_pulse_devices.sh > /dev/null <<'EOS'
#!/bin/bash
# name of the mic and speaker to use
mic="alsa_input.platform-sound_0.seeed-8ch"
speaker="alsa_output.platform-sound_0.seeed-2ch"
# wait for the source to exist
for (( ; ; ))
do
sleep 1
found=`pactl list sources | grep Name: | grep -v ".monitor" | grep ${mic} | wc -l `
if [ "$found" == "1" ]
then
break
fi
done
sleep 5
EOS
sudo chmod +x /usr/local/bin/wait_for_pulse_devices.sh

Workaround for devices without network connection

The network name resolution is not working without a connection. you need to hardcode the ip address of the mqtt broker. Edit the snips.toml and change localhost to 127.0.0.1 :

sudo vi /etc/snips.toml

Installing the assistant (without Sam)

Before running the install assistant commands, you have to connect to your ReSpeaker using SSH, Serial, etc., you can follow the official tutorial here. Delete the previous assistant if there is one.

$ sudo rm -rf /usr/share/snips/assistant/

Unzip your new assistant in the right ReSpeaker's folder

$ sudo unzip <assistant.zip> -d /usr/share/snips/

The assistant is now installed, let’s relaunch the different snips components:

$ sudo systemctl restart 'snips-*'

If you also have actions in your assistant, you'll need to Deploy your apps manually.