snipsco / snips-issues

Feel free to share your bugs with us.
14 stars 5 forks source link

[Platform] Raspbian Buster Support #161

Open MustacheEmperor opened 5 years ago

MustacheEmperor commented 5 years ago

Hello,

Following the instructions for manual setup, after adding the key and calling sudo apt-get update in Step 2, the terminal outputs a 404 for one of the sources sudo apt-get update Ign:1 https://raspbian.snips.ai/buster stable InRelease Err:2 https://raspbian.snips.ai/buster stable Release 404 Not Found [IP: 99.84.239.119 443] Hit:3 http://archive.raspberrypi.org/debian buster InRelease Hit:4 http://raspbian.raspberrypi.org/raspbian buster InRelease Reading package lists... Done E: The repository 'https://raspbian.snips.ai/buster stable Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.

Because the source can't update, I'm not able to do the following steps.

[EDIT cpoisson 2019/09/27]

Raspbian buster support is likely to happen at the end of october, meanwhile here's a summary of the possible workarounds

Workaround 1 (Recommended)

Use a debian stretch image available here, this distro is the one officially supported at the moment.

Workaround 2

There is 4 problems to solve to support officially buster.

If you feel that you don't have the required skills to proceed and debug issues, I urge you to fallback on Stretch :)

Switch to stretch repository

You need to replace buster by stretch in /etc/apt/sources.list.d/snips.list

sudo bash -c 'echo "deb https://raspbian.snips.ai/stretch stable main" > /etc/apt/sources.list.d/snips.list'

Install snips-asr

sudo apt install libgfortran3
sudo apt install libatlas3-base=3.10.3-8+rpi1
sudo apt install snips-asr

Install snips-tts

Some packages related to pico are missing from the rasbian buster repository

Using dpkg -i is it is possible to install then before installing snips-tts.

e.g.

wget http://ftp.fr.debian.org/debian/pool/non-free/s/svox/libttspico-utils_1.0+git20130326-9_armhf.deb
wget http://ftp.fr.debian.org/debian/pool/non-free/s/svox/libttspico0_1.0+git20130326-9_armhf.deb

sudo dpkg -i libttspico-utils_1.0+git20130326-9_armhf.deb
sudo dpkg -i libttspico0_1.0+git20130326-9_armhf.deb

sudo apt install snips-tts
MustacheEmperor commented 5 years ago

Downgrading to stretch works

cpoisson commented 5 years ago

Hi @MustacheEmperor,

We don't support officially buster at the moment.

AFAIK, even if Raspbian buster is out, the debian buster distro is still in a testing phase. [EDIT] 09/07 => Buster is now a stable release.

We are starting to have a look on this, and we already found some missing packages.

Regarding the packages sources, it is normal, this repo https://raspbian.snips.ai/buster does not exist.

You need to replace buster by stretch in /etc/apt/sources.list.d/snips.list

sudo bash -c 'echo "deb https://raspbian.snips.ai/stretch stable main" > /etc/apt/sources.list.d/snips.list'

But then you will encounter another dependencies problem related to snips-asr

A way to proceed is to install libgfortran5.

I am currently evaluating it on my side.

Also, hermes-python is not yet available for buster distro. (an issue has been filled here snipsco/hermes-protocol#133)

cpoisson commented 5 years ago

snips-tts is also causing some difficuIties.

It needed a bit of exploration on debian buster packages repository

snips-asr

sudo apt install libgfortran3
sudo apt install libatlas3-base=3.10.3-8+rpi1
sudo apt install snips-asr

snips-tts

Some packages related to pico are missing from the rasbian buster repository

Using dpkg -i is it is possible to install then before installing snips-tts.

e.g.

wget http://ftp.fr.debian.org/debian/pool/non-free/s/svox/libttspico-utils_1.0+git20130326-9_armhf.deb
wget http://ftp.fr.debian.org/debian/pool/non-free/s/svox/libttspico0_1.0+git20130326-9_armhf.deb

sudo dpkg -i libttspico-utils_1.0+git20130326-9_armhf.deb
sudo dpkg -i libttspico0_1.0+git20130326-9_armhf.deb

sudo apt install snips-tts
batje commented 5 years ago

I got stuck installing snips-asr because of the following dependency chain (but I found a workaround):

snips-skaldi > libatlas3-base > libblas-common

and Package 'libblas-common' has no installation candidate.

This is probably because the availablelibatlas3-base version is 3.10.3-1-snips.

I installed the standard stretch version by doing:

sudo apt-get install libatlas3-base=3.10.3-8+rpi1

After this, snips-asr does not start as it can not find libgfortran.so.3

So we need to create a symbolic link:

sudo ln -s /usr/lib/arm-linux-gnueabihf/libgfortran.so.5 /usr/lib/arm-linux-gnueabihf/libgfortran.so.3

That seems to have fixed things.

cpoisson commented 5 years ago

@batje , Thanks a bunch, I could see that the instruction I provided were wrong 👍 , It s updated now.

batje commented 5 years ago

Things seem to work, but when I install an assistent, i see a lot of these:

Running setup.sh & generating virtual environment for stanvn.Small_talk 
✖ Error setting up virtualenv, one or more actions might not be able to run. Reason :
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
rootkea commented 5 years ago

@cpoisson

AFAIK, even if Raspbian buster is out, the debian buster distro is still in a testing phase.

Debian released Buster as latest stable yesterday.

cpoisson commented 5 years ago

@batje

Yes, it is unrelated. Those are normal warnings issued by python tools to push python users to migrate for python 3. As they return a code different than 0 in the command line, SAM display them as errors.

code-pig commented 5 years ago

Hi,

Apologies I don't really understand thanks.

Does Snips work on Buster? Do the above comments fix the issue? Should I try and find an image of Stretch? Where can I find an image of stretch?

Thanks your help

cpoisson commented 5 years ago

Hi @code-pig ,

Short answer, use stretch to avoid dependencies issues.

I'll make a summary at the beginning of the ticket.

flatsiedatsie commented 5 years ago

@code-pig I have version 0.63.2 working just fine on a Raspbperry Pi 4 with Buster.

code-pig commented 5 years ago

I used stretch in the end, which was probably for the best as it forced me to learn a few things. Also im on the pi 3 so not sure if that makes any difference? Thanks for your help everybody

RaspiManu commented 5 years ago

@cpoisson Does workaround 2 in the first post still show the actual status with 3 open issues or is there something new?

sudheerthalla commented 5 years ago

@cpoisson Does workaround 2 in the first post still show the actual status with 3 open issues or is there something new?

Waiting for this update. When can we expect full support for raspbian buster?

RaspiManu commented 5 years ago

@cpoisson I am planning a long time project with snips.ai, so I would like to not downgrade to Stretch and wait for full Buster support instead. Would be nice to get a short status update. Thank you in advance.

jmwilson commented 5 years ago

The version numbering for Snips' copy of libatlas3-base is problematic here, which explains why the workaround needs the explicit instruction sudo apt install libatlas3-base=3.10.3-8+rpi1.

Buster's version number is 3.10.3-8+rpi1 which is parsed as package version 3.10.3 and Debian revision 8+rpi1. Snips' version is 3.10.3-1-snips. By the Debian policy manual (https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-version), this is parsed as package version 3.10.3-1 and Debian revision snips. What was probably intended is that the package version should be 3.10.3 with revision 1-snips, but this is not how apt interprets it.

Since 3.10.3-1 sorts after 3.10.3, apt sees this as a newer version, even though we understand it as being the same package version, with buster offering a newer revision (8+rpi1 vs 1-snips as was likely intended).

What needs to change here is that the package version should be 3.10.3-1+snips1 so it sorts correctly. You have to be careful about aliasing existing distro packages and being careless about an extra hyphen can break things as is happening here. Instead of annotating the version with a hyphen, you should use a + if you want your version to sort after the unannotated version, and a ~ if you want it to sort before. For example 1.0~abc1 < 1.0 < 1.0+abc1.

cpoisson commented 5 years ago

@RaspiManu Yes the status is up to date, expect things to move slowly as most of us are on holidays this month. The item is in our backlog (it needs to be done). We have more urgent items to tackle for september. I hope october would allow us to address this issue.

@jmwilson Thanks for the info, we dived into those docs lately to ease internal beta releases. We know that the versioning of this package is a bit messy. (FYI @fredszaq, @kali, @Garvys )

RaspiManu commented 5 years ago

@cpoisson Thank you very much for the reply. I will wait and check for updates here. Have a nice Holiday.

wilmardo commented 5 years ago

Instead of installing the packages with dpkg you could add the Debian repository:

wget -q https://ftp-master.debian.org/keys/release-10.asc -O- | apt-key add -
echo "deb http://deb.debian.org/debian buster non-free" >> /etc/apt/sources.list
apt-get update
apt-get install libttspico0

Source: https://bugs.launchpad.net/raspbian/+bug/1835974

I am working on an Ansible role to install Snips on Buster. I cannot boot Stretch since I own a Raspi4. There are no docs at the moment but someone might find it useful :) https://github.com/wilmardo/ansible-role-snips

flatsiedatsie commented 5 years ago

@momo42 If you don't want to wait, you could try this: https://forum.snips.ai/t/voco-a-fool-proof-way-of-running-snips/3484

michnovka commented 5 years ago

Raspi4 owner here. Can somebody else on raspi4 buster confirm all works well with workaround2? Thanks

nordcomputer commented 5 years ago

Any news on this?

stalakerob commented 5 years ago

Also waiting for quite some time now....

Bertware commented 5 years ago

This thread contains documentation on how to install snips on Raspbian Buster for now: https://forum.snips.ai/t/solved-raspberry-pi-4-buster-how-to-do-it/3647

Amhehu commented 5 years ago

Did someone already test it? It sounds too simply to be true.

cpoisson commented 5 years ago

⬆️ We are targeting end of october to deal with this issue.

sunilvb commented 5 years ago

Would love to see it on Buster sooner.

batje commented 5 years ago

What's stopping you? It's open source.

sunilvb commented 5 years ago

Ok followed the instructions and was able to install like below :

_Connected to device raspberrypi.local

OS version ................... Raspbian GNU/Linux 10 (buster) Installed assistant .......... Nathan Language ..................... en Hotword ...................... chappie ASR engine ................... snips Status ....................... Live

Service status:

snips-analytics .............. (not running) snips-asr .................... 0.63.3 (not running) snips-audio-server ........... 0.63.3 (not 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)_

Followed the Quick Start and got most of the snips service started (and working?). How do I start the asr and audio-server ? Alos, the command "sam watch" from my computer, is throwing the error: bash: snips-watch: command not found Am I missing something ?

nordcomputer commented 5 years ago

Would love to see it on Buster sooner.

Throw some money on it - it may help ;-)

[Insert Donation Button here]

cedricbellec commented 5 years ago

sudo apt-get install snips-watch should solve the issue

Nokius commented 5 years ago

I had no luck to get it working, I still get the message downgrade to strech, which is not possible with rpi4.

if any one can post a possible way to get it working would be great, thanks in advance! sam init fails. audio test works well :-/ October will end soon(tm) ...

jakemonton commented 5 years ago

@Nokius I give up on running snips on rpi4 as they still have not released official support for Buster. I reverted back to my old rpi3 for now just to test out what I'm working.

Nokius commented 5 years ago

any updates on the issue my rpi4 looks for some work :-/

I'm up for some testing (=

batje commented 5 years ago

it seems ubuntu 19.10 runs on a pi4. i havent tried, but maybe snips runs in that config?

shexbeer commented 5 years ago

I had no issues installing snips 0.64 on Buster with raspberry pi4 see this picture: https://imgur.com/a/DhsWvhn

Followed this guide (https://forum.snips.ai/t/solved-raspberry-pi-4-buster-how-to-do-it/3647/2), combined with the mentions about fortran here in that issue i was able to install it

I think it was something like:

echo "deb https://raspbian.snips.ai/stretch stable main" > /etc/apt/sources.list.d/snips.list
wget -q https://ftp-master.debian.org/keys/release-10.asc -O- | apt-key add -
echo "deb http://deb.debian.org/debian buster non-free" >> /etc/apt/sources.list
apt-key adv --keyserver gpg.mozilla.org --recv-keys D4F50CDCA10A2849
apt-get update
apt install -y dirmngr
apt install libttspico0 libttspico-utils
apt install libatlas3-base=3.10.3-8+rpi1
apt install libgfortran3
apt install snips-asr 
apt install snips-platform-voice
apt install -y snips-template snips-skill-server
Nokius commented 5 years ago

@shexbeer I followed it too.

pi@raspberrypi:~ $ sam status

Connected to device 192.168.xxx.xxx

OS version ................... Raspbian GNU/Linux 10 (buster)
Installed assistant .......... Not installed
Status ....................... Live (no assistant)

Service status:

snips-asr .................... 0.64.0 (not running)
snips-audio-server ........... 0.64.0 (running)
snips-dialogue ............... 0.64.0 (not running)
snips-hotword ................ 0.64.0 (running)
snips-nlu .................... 0.64.0 (not running)
snips-skill-server ........... 0.64.0 (running)
snips-tts .................... 0.64.0 (running)

snips-asr and snips-nul keep failing to start up :(

Nokius commented 5 years ago

well looks like the GPG key changed

Err:5 https://raspbian.snips.ai/stretch stable InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 531DD1A7B702B14D
Reading package lists... Done
W: GPG error: https://raspbian.snips.ai/stretch stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 531DD1A7B702B14D

looks like there is an aarch64 repo now for buster

Nokius commented 5 years ago

The GPG apt issue has a workaround add [trusted=yes] after deb

root@raspberrypi:/home/pi# sam status

Connected to device 192.168.xxx.xxx

OS version ................... Raspbian GNU/Linux 10 (buster)
Installed assistant .......... Snips
Language ..................... de
Hotword ...................... hey_snips
ASR engine ................... snips
Status ....................... Live

Service status:

snips-asr .................... 0.64.0 (not running)
snips-audio-server ........... 0.64.0 (running)
snips-dialogue ............... 0.64.0 (running)
snips-hotword ................ 0.64.0 (running)
snips-nlu .................... 0.64.0 (running)
snips-skill-server ........... 0.64.0 (not running)
snips-tts .................... 0.64.0 (running)

snips-asr and snips-skill-server still give a pain

after a reboot I just have issues with snips-asr. taken from journalctl Oct 24 22:15:54 raspberrypi snips-asr[1027]: /usr/bin/snips-asr: error while loading shared libraries: libgfortran.so.3: cannot open shared object file: No such file or directory something is missing :-/

also snips-watch is missing bash: snips-watch: command not found my fault it was missing fixed it apt-get install snips-watch

sam watch [22:19:40] [Dialogue] session with id '10c2692f-dcec-4561-a363-43c64705ca07' was ended on site default. The session timed out because the ASR component did not respond in a timely manner. Please ensure that the Asr is started and running correctly.


issue fixed!

apt-get install libgfortran3 && sam service start snips-asr fixed my issue, a missed pkg, for now

root@raspberrypi:/home/pi# sam status

Connected to device 192.168.xxx.xxx

OS version ................... Raspbian GNU/Linux 10 (buster)
Installed assistant .......... Snips
Language ..................... de
Hotword ...................... hey_snips
ASR engine ................... snips
Status ....................... Live

Service status:

snips-asr .................... 0.64.0 (running)
snips-audio-server ........... 0.64.0 (running)
snips-dialogue ............... 0.64.0 (running)
snips-hotword ................ 0.64.0 (running)
snips-nlu .................... 0.64.0 (running)
snips-skill-server ........... 0.64.0 (running)
snips-tts .................... 0.64.0 (running)

Summery:

echo "deb [trusted=yes] https://raspbian.snips.ai/stretch stable main" > /etc/apt/sources.list.d/snips.list
wget -q https://ftp-master.debian.org/keys/release-10.asc -O- | apt-key add -
echo "deb http://deb.debian.org/debian buster non-free" >> /etc/apt/sources.list
apt-key adv --keyserver gpg.mozilla.org --recv-keys D4F50CDCA10A2849
apt-get update
apt install -y dirmngr libttspico0 libttspico-utils libatlas3-base=3.10.3-8+rpi1 libgfortran3 snips-asr snips-platform-voice snips-template snips-skill-server snips-watch nodejs npm

after that I followed the Quick Start guide Step3

Amhehu commented 5 years ago

End of october is over. Are there any updates? Sorry, I'm very nervous ^^

ghost commented 5 years ago

issue fixed!

apt-get install libgfortran3 && sam service start snips-asr fixed my issue, a missed pkg, for now

I got back this from the pi trying to install libgfortran3.

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package libgfortran3 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libgfortran3' has no installation candidate
Pittermaennchen commented 5 years ago

⬆️ We are targeting end of october to deal with this issue.

@cpoisson Any news on this? I would like to join the snips community. But I bought a raspberry pi 4 and am unable to install Raspbian Stretch on it. :(

flatsiedatsie commented 5 years ago

You can install Snips on a Pi 4 with Buster just fine. Just not the latest version of Snips. The Voco add-on for the Mozilla Gateway does this, and doesn't have any dependencies.

Pittermaennchen commented 5 years ago

You can install Snips on a Pi 4 with Buster just fine. Just not the latest version of Snips. The Voco add-on for the Mozilla Gateway does this, and doesn't have any dependencies.

Thank you for the tip! I managed to install the Mozilla Gateway and added Voco. But I didn't manage to install the necessary drivers for my Respeaker 4-Mic Array yet.

If I get to this point: How can I change the Snips Language in the Voco addon? And how can I train my own assistant with this addon?

Amhehu commented 5 years ago

I just tried to follow this instructions on my RPi 3A. Everything is fine except of the snips-audio-server which is not running

OS version ................... Raspbian GNU/Linux 10 (buster) Installed assistant .......... XXX Language ..................... de Hotword ...................... hey_snips ASR engine ................... snips Status ....................... Live

Service status:

snips-asr .................... 0.64.0 (running) snips-audio-server ........... 0.64.0 (not running) snips-dialogue ............... 0.64.0 (running) snips-hotword ................ 0.64.0 (running) snips-nlu .................... 0.64.0 (running) snips-skill-server ........... 0.64.0 (running) snips-tts .................... 0.64.0 (running)

After some minutes I repeated the sam status command and the audio-server was running. Some seconds after I repeated it again ... and it was not running.

Pittermaennchen commented 5 years ago

@cpoisson Still no news on Raspberry Pi 4 support? I can't wait to get Snips to work 😬

janekbettinger commented 5 years ago

Hi, I have Snips running with Debian Buster on a Raspberry Pi 4 (Model B) and it works flawlessly.

Based on https://forum.snips.ai/t/solved-raspberry-pi-4-buster-how-to-do-it/3647/2 and https://docs.snips.ai/getting-started/quick-start-macos here is what I did:

ssh pi@raspberrypi.local

sudo apt update
sudo apt full-upgrade

sudo apt install -y dirmngr apt-transport-https
sudo bash -c  'echo "deb https://raspbian.snips.ai/stretch stable main" > /etc/apt/sources.list.d/snips.list'
sudo apt-key adv --fetch-keys  https://debian.snips.ai/5FFCD0DEB5BA45CD.pub

wget -q https://ftp-master.debian.org/keys/release-10.asc -O- | sudo apt-key add -
echo "deb http://deb.debian.org/debian buster non-free" | sudo tee /etc/apt/sources.list.d/debian.list
sudo apt-key adv --keyserver gpg.mozilla.org --recv-keys D4F50CDCA10A2849
sudo sh -c 'curl https://raspbian.snips.ai/531DD1A7B702B14D.pub | apt-key add -'
sudo apt update
sudo apt install -y libttspico0 libttspico-utils
sudo apt install -y libatlas3-base=3.10.3-8+rpi1
sudo apt install -y libgfortran3 snips-asr
sudo apt install -y snips-platform-voice
sudo apt install -y snips-watch
sudo apt install -y snips-template snips-skill-server
sudo apt install -y mosquitto

sudo systemctl start "snips-*"

sudo reboot
$ sam status

Connected to device 192.168.178.42

OS version ................... Raspbian GNU/Linux 10 (buster)
Installed assistant .......... My Assistant
Language ..................... de
Hotword ...................... hey_snips
ASR engine ................... snips
Status ....................... Live

Service status:

snips-asr .................... 0.64.0 (running)
snips-audio-server ........... 0.64.0 (running)
snips-dialogue ............... 0.64.0 (running)
snips-hotword ................ 0.64.0 (running)
snips-nlu .................... 0.64.0 (running)
snips-skill-server ........... 0.64.0 (running)
snips-tts .................... 0.64.0 (running)

The ReSpeaker 4-Mic Array (http://wiki.seeedstudio.com/ReSpeaker_4_Mic_Array_for_Raspberry_Pi/#getting-started) works fine as well.

Pittermaennchen commented 5 years ago

@kroka Thank you! That sounds great! I tried to do the same. But I don't understand the sudo bash -c command. I only get:

pi@raspberrypi:~ $ sudo bash -c  'echo "deb https://raspbian.snips.ai/stretch stable main"
> /etc/apt/sources.list.d/snips.list'
deb https://raspbian.snips.ai/stretch stable main
bash: line 1: /etc/apt/sources.list.d/snips.list: **Permission denied**
nordcomputer commented 5 years ago

seems like you have a file there with wrong permissions. Try the following:

sudo rm -r /etc/apt/sources.list.d/snips.list (deletes the file with the repository)

sudo bash -c  'echo "deb https://raspbian.snips.ai/stretch stable main" > /etc/apt/sources.list.d/snips.list'

(recreates it with the right content)

If that doesnt work, you can create the file by yourself (after deleting it): Open the file in an editor: sudo nano /etc/apt/sources.list.d/snips.list

paste the following content into it: deb https://raspbian.snips.ai/stretch stable main

Save the file with Ctrl+o and close the editor with Ctrl+x

Good luck!

PS.: I just installed Buster from scratch on a Pi3 - its working flawlessely with the "tutorial" from @kroka

flatsiedatsie commented 5 years ago

@Pittermaennchen if you still want to try the Voco route: it as built in support for loading your own assistant. It only supports English though.