Can't run Snips on Respeaker Core V2

#1

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

#2

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
#3

Seems that your skill server is having troubles too.

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

#4

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

#5

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.

#6

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.

#7

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?

#8

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

#9

@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

#10

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

#11

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