Cant get snips and matrix to work after following tutorial

I have used snips and reSpeaker Hat flawlessly, but recently purchased a Matrix Creator and also a Matrix Voice. I am impressed with the hardware, and hoped to replace my reSpeaker with Matrix. But I am frustrated after spending hours try to figure out what is wrong.’
Hopefully you can look at this information, Raspi version, Install and test logs and tell me what i am missing.

I have snips and a reSpeaker Hat working fine on Raspian Stretch Lite, clean install.
I attempted to create a SD card image, following your tutorial, using the same sam under windows 10 and all of the installs and tests work except for this:
When running sam watch i can see that “hey snips” is detected. But after that, nothing works. Here is detailed info on the process as i followed your tutorial.

I followed the hacksterio tutorial for snips and Matrix Voice

  1. Downloaded a clean older version of Raspian Lite (stretch) image from 04/2019 and used Etcher to copy to SD
  2. Have wifi and SSH enabled and running

Here is my asound.conf file:
pi@raspberrypi:~ $ cat /etc/asound.conf
pcm.!default {
type asym
playback.pcm {
type plug
slave.pcm “hw:0,0”
capture.pcm {
type plug
slave.pcm “hw:2,0”

Here is my /etc/snips.toml file:
pi@raspberrypi:~ $ cat /etc/snips.toml
# bus = “mqtt”
# mqtt = “localhost:1883”
# audio = ["+@mqtt"]
# assistant = “/usr/share/snips/assistant”
# user_dir = “/var/lib/snips”

## MQTT authentication
# mqtt_username = ""
# mqtt_password = ""

## MQTT TLS configuration
# mqtt_tls_hostname = ""
# mqtt_tls_disable_root_store = false
# mqtt_tls_cafile = ""
# mqtt_tls_capath = ""
# mqtt_tls_client_cert = ""
# mqtt_tls_client_key = ""


# no_fst_map = true
# beam_size = 8
# model = "/usr/share/snips/asr"
# audio = ["+@mqtt"]
# partial = false
# partial_period_ms = 250

# credentials = "/usr/share/snips/googlecredentials.json"
# audio = ["+@mqtt"]

# frame = 256
# bind = "default@mqtt"
mike = "MATRIXIO-SOUND: - (hw:2,0)"
# disable_playback = false
# disable_capture = false

# resources = "/usr/share/snips/dialogue"
# session_timeout = 15
# lambda_timeout = 5
# retry_count = 3
# sound_feedback_disabled_default = false

# model = "/usr/share/snips/hotword"
# hotword_id = "default"
# sensitivity = "0.5"
# audio = ["+@mqtt"]
# no_vad_inhibitor = false
# vad_messages = false

#asr_model = "/usr/share/snips/asr"
#nlu_engine = "/usr/share/snips/nlu_engine"
#keep_nfirst = 3


## Choose one tts provider (defaults to picotts)
# provider = "picotts"
# provider = "makerstts"
# provider = "customtts"
## customtts specific configuration (here configured to use picotts using the en-US language)
## available placeholder variables : %%OUTPUT_FILE%%, %%LANG%%, %%TEXT%%
# customtts = { command = ["pico2wave", "-w", "%%OUTPUT_FILE%%", "-l", "en-US", "%%TEXT%%"] }

# address = ""
## Pegasus TLS configuration
## Self signing certificates are generated with /usr/local/bin/
# tls_certificate_chain = "/var/lib/snips/pegasus/tls/server.fullchain"
# tls_private_key = "/var/lib/snips/pegasus/tls/server.key"
  1. Sam is working fine (and has worked with Snips and ReSpeaker Hat)

  2. Sam says all status is good for all servers except analytics (which has been disabled by snips latest version, as i understand)
    Connected to device
    OS version … Raspbian GNU/Linux 9 (stretch)
    Installed assistant … lights
    Language … en
    Hotword … hey_snips
    ASR engine … snips
    Status … Live
    Service status:
    snips-analytics … (not running)
    snips-asr … 0.63.3 (running)
    snips-audio-server … 0.63.3 (running)
    snips-dialogue … 0.63.3 (running)
    snips-hotword … 0.63.3 (running)
    snips-nlu … 0.63.3 (running)
    snips-skill-server … 0.63.3 (running)
    snips-tts … 0.63.3 (running)

  3. Installed Matrix drivers, HAL, and matrix lite, also node and mqtt working. Installed assistant.js and other files as in demo, and they run just fine. found 2 problems and fixed:
    a. In assistant.js as listed in the tutorial, file naming is wrong, so i edited to correct relayLightLite.js, everloopLightLite.js to relay.js, everloop.js
    var mqtt = require(‘mqtt’);
    var client = mqtt.connect(‘mqtt://localhost’, { port: 1883 });
    var relay = require(’./relayLightLite.js’);
    var everloop = require(’./everloopLightLite.js’);

  4. Sam test speaker and sam test microphone both work fine. Also arecord and aplay work fine from the console

  5. I installed the snips app following the light sample in the tutorial.

  6. Everything good up to this point. But here is where thing are problematic:
    a. when running sam watch i can see that “hey snips” is detected. But after that, nothing works. Here is a log:

PS C:\WINDOWS\system32> sam watch
[15:10:21] Watching on localhost:1883 (MQTT)
Note #1: I say “hey snips”
[15:10:24] [Hotword] detected on site default, for model hey_snips
[15:10:24] [Asr] was asked to stop listening on site default
[15:10:24] [Hotword] was asked to toggle itself ‘off’ on site default
[15:10:24] [Dialogue] session with id ‘5498fbfc-f9fd-4575-a186-4502622a0774’ was started on site default

Note #1 I never hear the audio file (a confirmation beep from snips)
[15:10:24] [AudioServer] was asked to play a wav of 41.1 kB with id ‘a1a6077e-81d3-4ba0-92c4-cd346a740157’ on site default

Note #3 I speak “turn on the lights” etc. over and over, but speech isnt detected
[15:10:39] [Dialogue] session with id ‘5498fbfc-f9fd-4575-a186-4502622a0774’ was ended on site default. The session was ended because one of the component didn’t respond in a timely manner
[15:10:39] [Asr] was asked to stop listening on site default
[15:10:39] [Hotword] was asked to toggle itself ‘on’ on site default

1 Like

I found the answer:

Snips is crashing when if plays the feedback audio file. Since the Matrix Voice is providing that feedback through Neopixels it can be disabled and everything works fine. There is however an issue to be resolved with the discrepency in the frequency of the audio output.

Change the line in /etc/snips.toml:

sound_feedback_disabled_default = false
sound_feedback_disabled_default =true

make sure to uncomment the line

1 Like

Hi @rickmini,

You are correct, it is an issue with audio output frequency. Another solution we found to work is adding the following line (rate 16000) in /etc/asound.conf. This enables the audio output to play as it should so it doesn’t block Snips.

playback.pcm {
   type plug
   slave.pcm “hw:0,0”
   rate 16000


1 Like

was having the same issue thought before the coffee pot was finished brewing I would have a look and see if it was common glad I found it so quickly on here will give it a go once the coffee is in my hand.

1 Like

Ill give it a try