Can't run Snips on Respeaker Core V2

Dear Community
I have snips installed on a Respeaker Core V2 with the instructions from https://docs.snips.ai/articles/other-platforms/respeaker-core-2.0#install-snips.
The installation went without a hitch.
But I can not use snips.
Issuing systemctl status snips* results in the following:

● snips-injection.service - Snips Injection
Loaded: loaded (/lib/systemd/system/snips-injection.service; enabled; vendor
Active: active (running) since Tue 2019-02-26 20:39:46 CET; 7min ago
Main PID: 2698 (snips-injection)
Tasks: 5 (limit: 4915)
CGroup: /system.slice/snips-injection.service
└─2698 /usr/bin/snips-injection

Feb 26 20:39:46 v2 systemd[1]: Started Snips Injection.
Feb 26 20:39:46 v2 snips-injection[2698]: INFO:snips_injection_hermes: Launch wi

● snips-nlu.service - Snips NLU
Loaded: loaded (/lib/systemd/system/snips-nlu.service; enabled; vendor preset
Active: activating (auto-restart) (Result: exit-code) since Tue 2019-02-26 20
Process: 7244 ExecStart=/usr/bin/snips-nlu (code=exited, status=1/FAILURE)
Main PID: 7244 (code=exited, status=1/FAILURE)

Feb 26 20:47:06 v2 systemd[1]: snips-nlu.service: Main process exited, code=exit
Feb 26 20:47:06 v2 systemd[1]: snips-nlu.service: Unit entered failed state.
Feb 26 20:47:06 v2 systemd[1]: snips-nlu.service: Failed with result ‘exit-code’

● snips-dialogue.service - Snips Dialogue
Loaded: loaded (/lib/systemd/system/snips-dialogue.service; enabled; vendor p
lines 1-23…skipping…
● snips-injection.service - Snips Injection
Loaded: loaded (/lib/systemd/system/snips-injection.service; enabled; vendor
Active: active (running) since Tue 2019-02-26 20:39:46 CET; 7min ago
Main PID: 2698 (snips-injection)
Tasks: 5 (limit: 4915)
CGroup: /system.slice/snips-injection.service
└─2698 /usr/bin/snips-injection

Feb 26 20:39:46 v2 systemd[1]: Started Snips Injection.
Feb 26 20:39:46 v2 snips-injection[2698]: INFO:snips_injection_hermes: Launch wi

● snips-nlu.service - Snips NLU
Loaded: loaded (/lib/systemd/system/snips-nlu.service; enabled; vendor preset
Active: activating (auto-restart) (Result: exit-code) since Tue 2019-02-26 20
Process: 7244 ExecStart=/usr/bin/snips-nlu (code=exited, status=1/FAILURE)
Main PID: 7244 (code=exited, status=1/FAILURE)

Feb 26 20:47:06 v2 systemd[1]: snips-nlu.service: Main process exited, code=exit
Feb 26 20:47:06 v2 systemd[1]: snips-nlu.service: Unit entered failed state.
Feb 26 20:47:06 v2 systemd[1]: snips-nlu.service: Failed with result ‘exit-code’

● snips-dialogue.service - Snips Dialogue
Loaded: loaded (/lib/systemd/system/snips-dialogue.service; enabled; vendor p
Active: active (running) since Tue 2019-02-26 20:39:46 CET; 7min ago
Main PID: 2708 (snips-dialogue)
Tasks: 4 (limit: 4915)
CGroup: /system.slice/snips-dialogue.service
└─2708 /usr/bin/snips-dialogue

Feb 26 20:39:46 v2 systemd[1]: Started Snips Dialogue.
Feb 26 20:39:46 v2 snips-dialogue[2708]: INFO:snips_dialogue_hermes: Loading the
Feb 26 20:39:46 v2 snips-dialogue[2708]: INFO:snips_dialogue_lib::config: Loadin
Feb 26 20:39:46 v2 snips-dialogue[2708]: INFO:snips_dialogue_hermes : Starti

● snips-tts.service - Snips TTS
Loaded: loaded (/lib/systemd/system/snips-tts.service; enabled; vendor preset
Active: active (running) since Tue 2019-02-26 20:39:46 CET; 7min ago
Main PID: 2717 (snips-tts)
Tasks: 2 (limit: 4915)
CGroup: /system.slice/snips-tts.service
└─2717 /usr/bin/snips-tts

Feb 26 20:39:46 v2 systemd[1]: Started Snips TTS.
Feb 26 20:39:46 v2 snips-tts[2717]: INFO:snips_tts_hermes: starting with provide

● snips-asr.service - Snips ASR
Loaded: loaded (/lib/systemd/system/snips-asr.service; enabled; vendor preset
Active: active (running) since Tue 2019-02-26 20:39:46 CET; 7min ago
Main PID: 2712 (snips-asr)
Tasks: 5 (limit: 4915)
CGroup: /system.slice/snips-asr.service
└─2712 /usr/bin/snips-asr

Feb 26 20:39:46 v2 systemd[1]: Started Snips ASR.

● snips-hotword.service - Snips Hotword
Loaded: loaded (/lib/systemd/system/snips-hotword.service; enabled; vendor pr
Active: active (running) since Tue 2019-02-26 20:39:46 CET; 7min ago
Main PID: 2710 (snips-hotword)
Tasks: 2 (limit: 4915)
CGroup: /system.slice/snips-hotword.service
└─2710 /usr/bin/snips-hotword

Feb 26 20:39:46 v2 systemd[1]: Started Snips Hotword.
Feb 26 20:39:46 v2 snips-hotword[2710]: INFO:snips_hotword::server: Using model
Feb 26 20:39:46 v2 snips-hotword[2710]: INFO:snips_hotword_lib::universal: Loadi

● snips-audio-server.service - Snips Audio Server
Loaded: loaded (/lib/systemd/system/snips-audio-server.service; enabled; vend
Active: activating (start-pre) since Tue 2019-02-26 20:46:08 CET; 58s ago
Main PID: 1679 (code=killed, signal=TERM); Control PID: 6623 (wait_for_pulse_)
Tasks: 2 (limit: 4915)
CGroup: /system.slice/snips-audio-server.service
└─control
├─6623 /bin/bash /usr/local/bin/wait_for_pulse_devices.sh
└─7260 sleep 1

Feb 26 20:47:05 v2 pulseaudio[7242]: [pulseaudio] main.c: Compiled with DEPRECAT
Feb 26 20:47:05 v2 pulseaudio[7242]: [pulseaudio] core-util.c: Home directory no
Feb 26 20:47:05 v2 pulseaudio[7239]: [pulseaudio] main.c: Start des Hintergrundd
Feb 26 20:47:05 v2 wait_for_pulse_devices.sh[6623]: Verbindungsfehler: Verbindun
Feb 26 20:47:05 v2 wait_for_pulse_devices.sh[6623]: pa_context_new() fehlgeschla
Feb 26 20:47:06 v2 pulseaudio[7259]: [pulseaudio] main.c: Compiled with DEPRECAT
Feb 26 20:47:06 v2 pulseaudio[7259]: [pulseaudio] core-util.c: Home directory no
Feb 26 20:47:06 v2 pulseaudio[7256]: [pulseaudio] main.c: Start des Hintergrundd
Feb 26 20:47:06 v2 wait_for_pulse_devices.sh[6623]: Verbindungsfehler: Verbindun
Feb 26 20:47:06 v2 wait_for_pulse_devices.sh[6623]: pa_context_new() fehlgeschla

● snips-skill-server.service - Snips Skill Server
Loaded: loaded (/lib/systemd/system/snips-skill-server.service; enabled; vend
Active: activating (auto-restart) (Result: exit-code) since Tue 2019-02-26 20
Process: 7207 ExecStart=/usr/bin/snips-skill-server (code=exited, status=1/FAI
Main PID: 7207 (code=exited, status=1/FAILURE)
Tasks: 0 (limit: 4915)
CGroup: /system.slice/snips-skill-server.service

Feb 26 20:47:02 v2 systemd[1]: snips-skill-server.service: Unit entered failed s
Feb 26 20:47:02 v2 systemd[1]: snips-skill-server.service: Failed with result 'e
lines 57-98/98 (END)
Loaded: loaded (/lib/systemd/system/snips-hotword.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2019-02-26 20:39:46 CET; 7min ago
Main PID: 2710 (snips-hotword)
Tasks: 2 (limit: 4915)
CGroup: /system.slice/snips-hotword.service
└─2710 /usr/bin/snips-hotword

Feb 26 20:39:46 v2 systemd[1]: Started Snips Hotword.
Feb 26 20:39:46 v2 snips-hotword[2710]: INFO:snips_hotword::server: Using model from /usr/share/snips/assistant/custo
Feb 26 20:39:46 v2 snips-hotword[2710]: INFO:snips_hotword_lib::universal: Loading model "/usr/share/snips/assistant/

● snips-audio-server.service - Snips Audio Server
Loaded: loaded (/lib/systemd/system/snips-audio-server.service; enabled; vendor preset: enabled)
Active: activating (start-pre) since Tue 2019-02-26 20:46:08 CET; 58s ago
Main PID: 1679 (code=killed, signal=TERM); Control PID: 6623 (wait_for_pulse_)
Tasks: 2 (limit: 4915)
CGroup: /system.slice/snips-audio-server.service
└─control
├─6623 /bin/bash /usr/local/bin/wait_for_pulse_devices.sh
└─7260 sleep 1

Feb 26 20:47:05 v2 pulseaudio[7242]: [pulseaudio] main.c: Compiled with DEPRECATED libsamplerate support!
Feb 26 20:47:05 v2 pulseaudio[7242]: [pulseaudio] core-util.c: Home directory not accessible: Keine Berechtigung
Feb 26 20:47:05 v2 pulseaudio[7239]: [pulseaudio] main.c: Start des Hintergrunddienstes fehlgeschlagen.
Feb 26 20:47:05 v2 wait_for_pulse_devices.sh[6623]: Verbindungsfehler: Verbindung verweigert
Feb 26 20:47:05 v2 wait_for_pulse_devices.sh[6623]: pa_context_new() fehlgeschlagen: Verbindung verweigert
Feb 26 20:47:06 v2 pulseaudio[7259]: [pulseaudio] main.c: Compiled with DEPRECATED libsamplerate support!
Feb 26 20:47:06 v2 pulseaudio[7259]: [pulseaudio] core-util.c: Home directory not accessible: Keine Berechtigung
Feb 26 20:47:06 v2 pulseaudio[7256]: [pulseaudio] main.c: Start des Hintergrunddienstes fehlgeschlagen.
Feb 26 20:47:06 v2 wait_for_pulse_devices.sh[6623]: Verbindungsfehler: Verbindung verweigert
Feb 26 20:47:06 v2 wait_for_pulse_devices.sh[6623]: pa_context_new() fehlgeschlagen: Verbindung verweigert

● snips-skill-server.service - Snips Skill Server
Loaded: loaded (/lib/systemd/system/snips-skill-server.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Tue 2019-02-26 20:47:02 CET; 4s ago
Process: 7207 ExecStart=/usr/bin/snips-skill-server (code=exited, status=1/FAILURE)
Main PID: 7207 (code=exited, status=1/FAILURE)
Tasks: 0 (limit: 4915)
CGroup: /system.slice/snips-skill-server.service

Feb 26 20:47:02 v2 systemd[1]: snips-skill-server.service: Unit entered failed state.
Feb 26 20:47:02 v2 systemd[1]: snips-skill-server.service: Failed with result ‘exit-code’.

I see that I have a problem with Pulseaudio.
I’ve already tried reinstalling Pulsaudio completely but the same problem.
Thanks for your help
Greetings from Germany

Hello,

I also ran on some cryptic troubles with the respeaker core and pulse audio.

To fix that I have re-executed the part related to pulse audio configuration in the documentation.

https://docs.snips.ai/articles/other-platforms/respeaker-core-2.0#install-snips

Try also this command first:

sudo usermod -a -G pulse-access _snips

Seems that your skill server is having troubles too.

Did you install https://github.com/snipsco/snips-skill-respeaker?

Thanks for your answer.
I have already tried this command again but the problem persists.

I already had problems with Pulseaudio before and then reinstalled Pulse. Without success.

it looks like there is a problem with the permissions of pulse itself.
It don’t have permissions to home directory.
Speaker Test and microphone Test with alsa works.
Speaker Test and microphone Test with pulseaudio works but i must add Parameter channel=2
Without this Parameter i cannot hear sound.

I’ve tryed to reinstall complete image and installiert snips again.
Samen Problems with pulseaudio
.
The skill Server somtimes run without trouble.
After reboot same Problem with skill Server.
Reboot again skill Server runs…
I dont know why.
My respeaker core 2.0 connected to Internet via Ethernet Cable. Not wifi.

What can i do to fix Problem with pulseaudio
(Primary Problem)

Sorry for my english :sweat_smile:
Have a nice day
Greetz from germany

I’ve also been running into many issues getting Snips to work on my ReSpeaker Core v2.0. It has been incredibly frustrating, to say the least. The documentation absolutely needs to be updated. I am to the point where I’m ready to link it to Alexa Voice Services, instead, as much as I don’t want to.

Basic tests without installing snips platform shows some strange behavior regarding audio.

Did you manage to solve your problems?

We are currently investigating sound input and output issues.

Documentation need indeed some clarification. A clean up is ongoing for this page.

Did you succeed in setting up the platform on your respeaker core?

Hello,

After latest Update snips works on my Respeaker core v2.

but I have problems with tts (snips does not give me a reply) the skill-server is not running because there are no skills in the directory, Snips does not recognize words correctly and sometimes only 1 or 2 words from a command set. For example, he usually only recognizes “living room” or “switching off the living room”

I also became aware of aec. are there any improvements in the hotword or text recognition example with TV in the background? Do I need an extra plugin from the core v2 for that?

Thanks for your Help

Greetings from Germany

@psycoworm - glad you got yours working
@everyone else - I have the same problem but I’m at my wits end trying to fix it. Here is my output. I can provide whatever else is needed…

respeaker@v2:~ sudo systemctl restart 'snips-*' [sudo] password for respeaker: Job for snips-audio-server.service failed because a timeout was exceeded. See "systemctl status snips-audio-server.service" and "journalctl -xe" for details. respeaker@v2:~ systemctl status snips-audio-server.service
? snips-audio-server.service - Snips Audio Server
Loaded: loaded (/lib/systemd/system/snips-audio-server.service; enabled; vendor preset: enabl
Active: activating (start-pre) since Thu 2019-04-11 23:04:01 UTC; 1min 13s ago
Cntrl PID: 24574 (wait_for_pulse_)
Tasks: 2 (limit: 4915)
CGroup: /system.slice/snips-audio-server.service
??control
??24574 /bin/bash /usr/local/bin/wait_for_pulse_devices.sh
??25183 sleep 1

Apr 11 23:05:11 v2 wait_for_pulse_devices.sh[24574]: pa_context_connect() failed: Connection ref
Apr 11 23:05:12 v2 pulseaudio[25171]: [pulseaudio] main.c: Compiled with DEPRECATED libsamplerat
Apr 11 23:05:12 v2 pulseaudio[25171]: [pulseaudio] core-util.c: Failed to create secure director
Apr 11 23:05:12 v2 pulseaudio[25168]: [pulseaudio] main.c: Daemon startup failed.
Apr 11 23:05:12 v2 wait_for_pulse_devices.sh[24574]: Connection failure: Connection refused
Apr 11 23:05:12 v2 wait_for_pulse_devices.sh[24574]: pa_context_connect() failed: Connection ref
Apr 11 23:05:14 v2 pulseaudio[25182]: [pulseaudio] main.c: Compiled with DEPRECATED libsamplerat
Apr 11 23:05:14 v2 pulseaudio[25182]: [pulseaudio] core-util.c: Failed to create secure director
Apr 11 23:05:14 v2 wait_for_pulse_devices.sh[24574]: Connection failure: Connection refused
Apr 11 23:05:14 v2 wait_for_pulse_devices.sh[24574]: pa_context_connect() failed: Connection ref

respeaker@v2:~$

? snips-audio-server.service - Snips Audio Server
Loaded: loaded (/lib/systemd/system/snips-audio-server.service; enabled; vendor preset: enabl
Active: activating (start-pre) since Thu 2019-04-11 22:19:06 UTC; 1min 4s ago
Cntrl PID: 2992 (wait_for_pulse_)
Tasks: 10 (limit: 4915)
CGroup: /system.slice/snips-audio-server.service
??control
??2992 /bin/bash /usr/local/bin/wait_for_pulse_devices.sh
??3525 /bin/bash /usr/local/bin/wait_for_pulse_devices.sh
??3526 pactl list sources
??3527 grep Name:
??3528 grep -v .monitor
??3529 grep alsa_input.platform-sound_0.seeed-8ch
??3530 wc -l
??3531 /usr/bin/pulseaudio --start --log-target=syslog
??3533 /usr/bin/pulseaudio --start --log-target=syslog
??3534 /usr/bin/pulseaudio --start --log-target=syslog

Snips-watch -vvv does nothing. I did have it working before the upgrade. I remade/reimaged everything from my assistant to the respeaker image.

Any help is much appreciated.
Jeff

Nothing? Really? Just no ideas out there or is my question too stupid to answer? :stuck_out_tongue:

Well, ok. I’m going to start from scratch again for the third time. Any suggestions or advice before I start the respeaker re-image? LOL

No, seriously…

Jeff

NEWS FLASH

I think I made a little progress on this. Here are the errors I’m getting now:

RESTART - NOT SUDO
respeaker@v2:~ systemctl restart snips-audio-server ==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units === Authentication is required to restart 'snips-audio-server.service'. Authenticating as: root Password: polkit-agent-helper-1: pam_authenticate failed: Authentication failure ==== AUTHENTICATION FAILED === Failed to restart snips-audio-server.service: Access denied See system logs and 'systemctl status snips-audio-server.service' for details. respeaker@v2:~ systemctl status snips-audio-server.service
? snips-audio-server.service - Snips Audio Server
Loaded: loaded (/lib/systemd/system/snips-audio-server.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: timeout) since Wed 2019-05-08 21:54:55 UTC; 2s ago
Process: 724 ExecStartPre=/usr/local/bin/wait_for_pulse_devices.sh (code=killed, signal=TERM)

May 08 21:54:55 v2 systemd[1]: snips-audio-server.service: Unit entered failed state.
May 08 21:54:55 v2 systemd[1]: snips-audio-server.service: Failed with result ‘timeout’.
respeaker@v2:~$

respeaker@v2:~$ journalctl -f -u snips-audio-server
– Logs begin at Wed 2019-05-08 20:39:04 UTC. –
May 08 21:58:34 v2 wait_for_pulse_devices.sh[4339]: pa_context_connect() failed: Connection refused
May 08 21:58:35 v2 wait_for_pulse_devices.sh[4339]: XDG_RUNTIME_DIR (/var/snips-audio-server) is not owned by us (uid 0), but by uid 113! (This could e g happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don’t do that.)
May 08 21:58:35 v2 wait_for_pulse_devices.sh[4339]: Connection failure: Connection refused
May 08 21:58:35 v2 wait_for_pulse_devices.sh[4339]: pa_context_connect() failed: Connection refused
May 08 21:58:36 v2 wait_for_pulse_devices.sh[4339]: XDG_RUNTIME_DIR (/var/snips-audio-server) is not owned by us (uid 0), but by uid 113! (This could e g happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don’t do that.)
May 08 21:58:36 v2 wait_for_pulse_devices.sh[4339]: Connection failure: Connection refused
May 08 21:58:36 v2 wait_for_pulse_devices.sh[4339]: pa_context_connect() failed: Connection refused
May 08 21:58:37 v2 wait_for_pulse_devices.sh[4339]: XDG_RUNTIME_DIR (/var/snips-audio-server) is not owned by us (uid 0), but by uid 113! (This could e g happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don’t do that.)

LET’S TRY WITH SUDO
espeaker@v2:~ sudo systemctl restart snips-audio-server [sudo] password for respeaker: Job for snips-audio-server.service failed because a timeout was exceeded. See "systemctl status snips-audio-server.service" and "journalctl -xe" for details. respeaker@v2:~ systemctl status snips-audio-server.service
? snips-audio-server.service - Snips Audio Server
Loaded: loaded (/lib/systemd/system/snips-audio-server.service; enabled; vendor preset: enabled)
Active: activating (start-pre) since Wed 2019-05-08 22:49:51 UTC; 52s ago
Cntrl PID: 10248 (wait_for_pulse_)
Tasks: 2 (limit: 4915)
CGroup: /system.slice/snips-audio-server.service
??control
??10248 /bin/bash /usr/local/bin/wait_for_pulse_devices.sh
??10905 sleep 1

May 08 22:50:40 v2 wait_for_pulse_devices.sh[10248]: pa_context_connect() failed: Connection refused
May 08 22:50:41 v2 wait_for_pulse_devices.sh[10248]: XDG_RUNTIME_DIR (/var/snips-audio-server) is not owned by us (uid 0), but by uid 113! (This could e g happen if you try to connect to a non-root Pu
May 08 22:50:41 v2 wait_for_pulse_devices.sh[10248]: Connection failure: Connection refused
May 08 22:50:41 v2 wait_for_pulse_devices.sh[10248]: pa_context_connect() failed: Connection refused
May 08 22:50:42 v2 wait_for_pulse_devices.sh[10248]: XDG_RUNTIME_DIR (/var/snips-audio-server) is not owned by us (uid 0), but by uid 113! (This could e g happen if you try to connect to a non-root Pu
May 08 22:50:42 v2 wait_for_pulse_devices.sh[10248]: Connection failure: Connection refused
May 08 22:50:42 v2 wait_for_pulse_devices.sh[10248]: pa_context_connect() failed: Connection refused
May 08 22:50:43 v2 wait_for_pulse_devices.sh[10248]: XDG_RUNTIME_DIR (/var/snips-audio-server) is not owned by us (uid 0), but by uid 113! (This could e g happen if you try to connect to a non-root Pu
May 08 22:50:43 v2 wait_for_pulse_devices.sh[10248]: Connection failure: Connection refused
May 08 22:50:43 v2 wait_for_pulse_devices.sh[10248]: pa_context_connect() failed: Connection refused

respeaker@v2:~$

  • uid 0 is root of course, uid 113 is _snips
  • I chmod’ed /etc/snips-audio-server/pulse/ and /etc/snips-audio-server/ to 777.

So root is trying to start snips-audio and _snips won’t let him have the permissions.

What exactly does this mean? How do we fix it?
(This could e g happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don’t do that.)

If anybody is listening…please help.

Thanks
Jeff

Hello
I am from Germany and have a Core V2 and the same problems.
After some time I find a way to bring it to run.
I test some things and find out, that pulseaudio starts automatic for user respeaker and in some Images are less audiocards shown.
So I write a procdure for the Installation and after that snips on Core V2 tell you the time…

Here it is: in 3 Parts

Part 1 Install Image

Load Image:
not from onedrive
not from fangcloud
use: ibschoolnz-my.sharepoint
It is not alowed to post links!

may possible: respeaker-debian-9-lxqt-flasher-20180801
I use: respeaker-debian-9-lxqt-flasher-20180730-4gb.img.xz

write it on sd: for example get etcher for Windows

search for balena.io/etcher/

insert sd, power on, wait, remove sd, restart

Part 2 connect to Network
(and Test Hardware (if you want))

use putty
Serial Console 115200 --> password & user = respeaker

sudo nmtui # respeaker user needs sudo -->> Activate a connection or plugin a cat cable

German:
sudo dpkg-reconfigure locales --> de_DE.UTF-8 UTF-8
sudo timedatectl set-timezone Europe/Berlin

sudo -s

apt update
apt-mark hold firefox-esr
apt install mc -y

apt upgrade -y
exit

close putty

use putty
Connect to SSH // password: respeaker

----------------------------------------------Hardware Test from the Alexa demo-----------------------------------------
sudo -s
respeaker@v2:~$ bluetoothctl
Record and Play

1.Test via ALSA

respeaker@v2:~$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: seeed8micvoicec [seeed-8mic-voicecard], device 0: 100b0000.i2s1-ac108-pcm0 ac108-pcm0-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0

respeaker@v2:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: seeed8micvoicec [seeed-8mic-voicecard], device 1: 100b0000.i2s1-rk3228-hifi rk3228-hifi-1 []
Subdevices: 1/1
Subdevice #0: subdevice #0

Find the sound card whose name has seeed prefix. For the example above, the capture device is hw:0,0, which means card 0/device 0. The playback device is hw:0,1, which means card 0/device 1… Then test recording and playing sound with the following commands:

record & playback 2 channels audio

arecord -Dhw:0,0 -f S16_LE -r 16000 -c 2 hello.wav
aplay -Dhw:0,1 -r 16000 -c 2 hello.wav

record 8 channels audio

there are 6 microphones on board, and ac108 compose the 2 remaining channels.

arecord -Dhw:0,0 -f S16_LE -r 16000 -c 8 hello_8ch.wav

Besides you can record and play at the same time.

arecord | aplay

  1. Test via PulseAudio

First check whether the PulseAudio is running:

respeaker@v2:~$ ps aux|grep pulse|grep -v grep

good:
respeak+ 1109 0.0 0.7 363272 7932 ? S<l 01:01 0:00 /usr/bin/pulseaudio --start --log-target=syslog

bad:
respeak+ 20721 0.6 0.7 365664 7308 ? S<sl 15:15 0:00 /usr/bin/pulseaudio --daemonize=no

Ignore & use fix later

parecord --channels=8 --rate=16000 --format=s16le hello2.wav
paplay hello2.wav

Further more, the default ALSA device now hooks to PulseAudio, so using the following commands also plays/records sound via PulseAudio:

arecord -v -f cd hello3.wav
aplay hello3.wav

----------------------------------------------Ende Hardware Test-----------------------------------------

Part 3

OK, let’s play.

If you want more space:
move home to sd-Card

if the sd is empty install gparted (apt install gparted) and create a ext4 partition in the GUI 16 GB is OK)

du -sh /home

sudo fdisk -l

/dev/mmcblk0p1 2048 32770047 32768000 15,6G 83 Linux

sudo -s

mkdir /mnt/tmp
mount /dev/mmcblk0p1 /mnt/tmp

Nun ggf. alte Installationen unter /mnt/tmp mit mc löschen

rsync -avxH --progress /home/ /mnt/tmp

Tests:
mount /dev/mmcblk0p1 /home
du -sh /home; mount|grep /home
umount /home

blkid

/dev/mmcblk0p1: LABEL=“home” UUID=“445cfc41-4917-4e99-b935-e5b7ee8222ec” TYPE=“ext4” PARTUUID=“7bf62b25-01”

sudo nano /etc/fstab

UUID=445cfc41-4917-4e99-b935-e5b7ee8222ec /home ext4 defaults 0 2

Remove old /home
sudo rm -rf /home/*
sudo mount /dev/mmcblk0p1 /home

reboot

sudo -s

–> copy and see! line by line

apt-get update
apt-get install -y dirmngr
apt-get install -y apt-transport-https
bash -c ‘echo “deb https://raspbian.snips.ai/respeaker_iot stable main” > /etc/apt/sources.list.d/snips.list’
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D4F50CDCA10A2849
apt-get update
apt-get install -y snips-platform-voice
apt-get install -y snips-platform-demo
apt-get install -y snips-tts
apt-get install -y snips-watch
apt-get install -y snips-template snips-skill-server

#sudo apt-get --reinstall install -y snips-platform-voice
usermod -a -G pulse-access _snips

nano /etc/pulse/daemon.conf

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

---------------------------------> copy this part to ssh to install files <----------------------

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

systemctl daemon-reload

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

systemctl daemon-reload

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

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

chmod +x /usr/local/bin/wait_for_pulse_devices.sh

-----------------------------------> paste this part to install files (in one step)<--------------------

nano /etc/snips.toml
change localhost to 127.0.0.1
[snips-common]
bus = “mqtt”
mqtt = “127.0.0.1:1883”
audio = ["+@mqtt"]
assistant = “/usr/share/snips/assistant”
user_dir = “/var/lib/snips”

check all lines!!!

apt install samba

Register and Download assistant from snipes.ai

vnc
Desktop-find:PCManFM-Qt

apt install bash
apt install python3-venv

Download skills from git
coppy assistant*.zip to /home/respeaker
rm -rf /usr/share/snips/assistant/
unzip assistant*.zip -d /usr/share/snips/

Up to now we have no SAM so manually install skills

copy skills
example: (For the color-ring)
Find git for: snipsco/snips-skill-respeaker
git clone …git
cp -r snips-skill-respeaker /var/lib/snips/skills/
cd /var/lib/snips/skills/snips-skill-respeaker
./setup.sh

example: (For date time in German)
Find git for: MrJohnZoidberg/Snips-DatumUhrzeit
git clone …git
cp -r Snips-DatumUhrzeit /var/lib/snips/skills/
cd /var/lib/snips/skills/Snips-DatumUhrzeit

some skills have problems with Phyton 3 so
change setup.sh first line to

#!/usr/bin/env bash
set -e

to find out the errors
run
./setup.sh
find /venv/activate and set executeable (with mc)
./setup.sh

nano /etc/mosquitto/mosquitto.conf

port 1883
listener 1884
protocol websockets

service mosquitto restart
mosquitto -v

reboot

Test something:
systemctl status snips-dialogue
systemctl status mosquitto
sudo tail -f /var/log/syslog
service pulseaudio restart
systemctl restart ‘snips-*’

ps aux | grep snips
_snips 2053 0.6 0.9 84456 9360 ? Ssl 08:33 0:00 /usr/bin/snips-injection
_snips 2065 0.0 0.3 9748 3196 ? Ssl 08:33 0:00 /usr/bin/snips-tts
_snips 2066 12.3 3.2 50624 32520 ? Ssl 08:33 0:06 /usr/bin/snips-hotword
_snips 2067 11.2 9.2 112440 93208 ? Ssl 08:33 0:05 /usr/bin/snips-nlu
_snips 2069 33.9 5.6 141472 57084 ? Ssl 08:33 0:18 /usr/bin/snips-asr
_snips 2089 0.2 0.5 17316 5624 ? Ssl 08:33 0:00 /usr/bin/snips-dialogue
_snips 2106 22.0 0.7 128816 7660 ? Ssl 08:33 0:10 /usr/bin/snips-audio-server
root 2135 0.0 0.0 4164 548 pts/0 S+ 08:34 0:00 grep snips

Yes!

To test the skills without sound (Text output; install snips-WebTest)

apt install apache2
apt install nodejs

find & get zip from philipp2310/snips-WebTest
unzip snips-WebTest*.zip -d /var/www/html

sudo mc
move snips-WebTest files to /var/www/html
or use git clone

Web snips-WebTest: Server IP:192.168.x.x Port: 1884

snips-watch -vvv
for now: after every reboot do:

service pulseaudio restart
systemctl restart ‘snips-*’
Ask snips “Hey Snips” --> Ring rotate
Ask snips “Wie spät ist es” --> The answer follows

Hi Nobby, i am new in the whole linux thing.
I got the same Problem (the bad one) how do you fix it? I can not find the line.
Thanks for your work
Greetings from Düsseldorf

Hello johny
you can fix it, if you login with ssh after a reboot and type in:
sudo systemctl restart pulseaudio
sudo systemctl restart ‘snips-*’
Then it work.
It is from the autostart file /etc/xdg/autostart/pulseaudio.desktop
and I think it use the respeaker user setting.
You can do the job manually or by a part in the crontab (after booting)
I use the Core V2 mostly for fhem, so be shure no other skill from the Assitant will try to answer your request. Try it first with one skill in the Assitant and one in the Hardware. You can ckeck it and download the right things by the command:
cat /usr/share/snips/assistant/Snipsfile.yaml
and fhem is in the Assistand and have no extra files in /var/lib/snips/skills/… after that i do some other things. For example I increase the mic sensibility from 50% to 80% with the alsamixer command and save it. If I have time I try to connect mpd with it.
Greetings from Hamm

Part 4
… and you can restart pulseaudio as a cronjob after reboot …

Create a file and make it executeable:

tee /usr/local/bin/restart_pulseaudio_as_service.sh > /dev/null <<‘EOS’
#!/bin/bash
service pulseaudio restart
systemctl restart ‘snips-*’
EOS

chmod +x /usr/local/bin/restart_pulseaudio_as_service.sh
then edit crontab:
sudo nano /etc/crontab

add the line:
@reboot root /usr/local/bin/restart_pulseaudio_as_service.sh

after a reboot snips works …