[Solved] MATRIX Voice + snips.ai Raspi could not be found

I have two problem with step 3 from guide https://www.hackster.io/matrix-labs/matrix-voice-and-matrix-creator-running-snips-ai-b48344#comments:

FIRST PROBLEM:

sam devices produces an error:

Der Befehl “grep” ist entweder falsch geschrieben oder konnte nicht gefunden werden.
–> in English: The “grep” command is either misspelled or could not be found

Following the log:

Microsoft Windows [Version 10.0.15063]
© 2017 Microsoft Corporation. Alle Rechte vorbehalten.

C:\Users\MYCOMPUTER >sam devices

  • Scanning devices on the network…exec: Der Befehl “grep” ist entweder falsch geschrieben oder konnte nicht gefunden werden.

    Scanning devices on the network…
    i No devices discovered

SECOND PROBLEM:

Ignoring the error below I went to the next step “connecting Raspi”. I have tried:

  • sam connect raspberrypi.local
  • sam connect _[IP OF PI]_

Following the log:

C:\Users\MYCOMPUTER>sam connect [IP OF PI]
? Enter username for the device: [PI-NAME]
? Enter password for the device: [hidden]

× Error connecting to [IP OF PI]: connect ECONNREFUSED [IP OF PI]>:22

I can see my Raspberry with other tools on Windows (Remote Desktop) and I know [IP OF PI] is correct, therefore I do not understand why sam connect [IP OF PI] is not working.

Hi @IFE. In regards to the first problem, the sam devices command will not work with the standard Windows terminal because of the difference in commands.

Addressing the second problem, did you change the username & password of your Raspberry Pi?
The default credentials should be:
user: pi
password: raspberry

Another possibility is that the Raspberry Pi needs SSH enabled. You can turn this on by going into the terminal of your Raspberry Pi and entering:

sudo raspi-config

Once entered, you’ll be shown a blue menu that you can control with your arrow keys and enter key. Navigate to and press enter on the following:

5 Interfacing Options > P2 SSH > Yes > Ok

Let us know if this resolves your issue.

Thanks for that, I will check it…

Hi @IFE. In regards to the first problem, the sam devices command will not work with the standard Windows terminal because of the difference in commands.

Ok, and what do I have to use? I understood the documentation that I have to use the CMD from Windows (I am a little confused)?

Many Thanks

You don’t need to use sam devices if you already have your Pi’s IP, but the command should work if you install the Linux Bash Shell on your Windows 10. The CMD from Windows, in administrative mode, should still work for everything else.

Another possibility is that the Raspberry Pi needs SSH enabled.

That was the solution. After enabling SSH * sam connect [IP OF PI] worked and was able to install via sam init.

Maybe you could add this info to your guide here: https://www.hackster.io/matrix-labs/matrix-voice-and-matrix-creator-running-snips-ai-b48344

Finally I’ve a last problem with sam test microphone (speakers are working):

  • I’ve choosen card 0

  • Setup should be correct:

setup

But after sam test microphone I coudl not here anything.

Thank you for the suggestion. We’ll be adding SSH instructions to the Hackster guide later today.

For the microphone to work, you need to remove the # in
# mike = "MATRIXIO SOUND: - (hw:2,0)"

1 Like

I’ve removed it and did not work.

config

Hi, i have the exact same problem with this tutorial.
I can not get it up and running.

Btw, i still have this demo running: https://www.hackster.io/matrix-labs/get-started-w-esp32-on-the-matrix-voice-d01e0d
Could it be that this is the problem, or should it work anyway?

I’ve setup a fresh ne Raspi and now it works. On the old Raspi I have installed in parallel MATRIX Voice with Alexa on it, maybe there is a problem when installation two systems in parallel?

One question I have regarding Snips and MATRIX Voice: How do I setup the volume of the loudspeker for the Snips system?

–> With: amixer sset PCM,0 30%

I tried it now with a fresh installation on the raspberry pi, and i also deleted the program inside the ESP32 on my Matrix voice…
If i run sam test speaker i can hear sound, but if i test the microphone i just can’t hear anything…
There is another thing i noticed, if i run the following command:
amixer set PCM 100% && arecord recording.wav -f S16_LE -r 16000 -d 5 && aplay recording.wav
i get the following output:

Simple mixer control ‘PCM’,0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback -10239 - 400
Mono: Playback 400 [100%] [4.00dB] [on]
arecord: main:788: audio open error: No such file or directory

Can anyone please help me, i really would like to use snips.ai on my matrix, but i am really frustrated now, because i can’t get the basic example running on my device :frowning: