User:Joca/Snips on debian (64 bits): Difference between revisions

From XPUB & Lens-Based wiki
(Created page with " For my own reference, a brief guide on how to install Snips on a computer running debian on a 64 bits processor. This guide will be updated. = Prepare machine = 1) instal...")
 
 
(One intermediate revision by the same user not shown)
Line 6: Line 6:
This guide will be updated.
This guide will be updated.


= Prepare machine =
== Prepare machine ==
1) install debian
1) install debian


Line 86: Line 86:


== Install Snips using Sam, or manually ==
== Install Snips using Sam, or manually ==
7 A) Install Snips using Sam  
=== Install Snips using Sam ===


Go to your other computer and install Sam if you didn't already. (Same requires nodejs to be installed)
Go to your other computer and install Sam if you didn't already. (Same requires nodejs to be installed)
Line 164: Line 164:
Many of the services are not yet running. That is because no assistant has been installed, and because the microphone has not been set up. You can follow on from step 4 on [https://docs.snips.ai/getting-started/quick-start-raspberry-pi| https://docs.snips.ai/getting-started/quick-start-raspberry-pi]
Many of the services are not yet running. That is because no assistant has been installed, and because the microphone has not been set up. You can follow on from step 4 on [https://docs.snips.ai/getting-started/quick-start-raspberry-pi| https://docs.snips.ai/getting-started/quick-start-raspberry-pi]


7 B) Install snips manually
=== Install snips manually ===


<code>
<code>

Latest revision as of 16:36, 29 April 2019


For my own reference, a brief guide on how to install Snips on a computer running debian on a 64 bits processor.


This guide will be updated.

Prepare machine

1) install debian

See: https://www.debian.org/releases/stretch/amd64/

2) add user to sudo group

login to root (terminal will ask for root password)

su

add user to sudo group

sudo usermod -aG sudo <username>

Reboot the computer

3) Enable ssh

sudo apt install openssh-server

Install dependencies

4) Configure this user to enable sudo without asking for a password on ssh connections. This solves the 'no tty or askpass' error when controlling this computer via another machine using SAM (a command line interface to easily setup and maintain devices running Snips from one computer)

sudo visudo

Then edit that file to add to the very end:

<username> ALL=(ALL) NOPASSWD: ALL

eg.

johanna ALL=(ALL) NOPASSWD: ALL

Please mind that this solution is not really secure. Edit this page if you happen to know a better fix. (source: https://stackoverflow.com/questions/21659637/how-to-fix-sudo-no-tty-present-and-no-askpass-program-specified-error )

5) Install Pip & Hermes-Python (library used to communicate from python to other parts of the software using MQTT)

sudo apt install python3-pip

sudo apt install python-pip

pip -m install hermes-python

pip3 -m install hermes-python

6) Connect to this computer from another device using ssh. If everything is working fine, exit.

Install Snips using Sam, or manually

Install Snips using Sam

Go to your other computer and install Sam if you didn't already. (Same requires nodejs to be installed)

sudo npm install -g snips-sam

Connect to the computer that you prepared to install Snips on:

sam connect <ipadress or hostname>

Use the same login credentials that you would use for connecting to this device over ssh.

We are now ready to install the Snips platform on the Raspberry Pi. Enter the command:

sam init

This will take a few minutes, after which the device will reboot. Run the

sam status

command to check the status of your device. It should show that the platform has been installed:

sam status​

Connected to device debian.local​

OS version ................... Debian GNU/Linux 9 (stretch)

Installed assistant .......... Not installed

Status ....................... Installed, not running​

Service status:​snips-analytics .............. 0.55.2 (not running)

snips-asr .................... 0.55.2 (not running)

snips-audio-server ........... 0.55.2 (running)

snips-dialogue ............... 0.55.2 (not running)

snips-hotword ................ 0.55.2 (not running)

snips-nlu .................... 0.55.2 (not running)

snips-skill-server ........... 0.55.2 (not running)

snips-tts .................... 0.55.2 (running)

Many of the services are not yet running. That is because no assistant has been installed, and because the microphone has not been set up. You can follow on from step 4 on https://docs.snips.ai/getting-started/quick-start-raspberry-pi

Install snips manually

sudo apt-get update

sudo apt-get install -y dirmngr apt-transport-https

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

sudo apt-key adv --keyserver pgp.mit.edu --recv-keys F727C778CCB0A455

sudo apt-get update

sudo apt-get install -y snips-platform-voice

sudo apt-get install -y snips-platform-demo

sudo apt-get install -y snips-tts

sudo apt-get install -y snips-watch

sudo apt-get install -y snips-template snips-skill-server

From there you can follow the configuration section of the instructions in the following guide: https://docs.snips.ai/articles/platform/platform-configuration