Snips Skills Manager
Project description
Snips Skills Manager
The Snips Skills Manager is a tool for easily setting up and managing a Snips assistant.
A single configuration file, the Snipsfile, is required to create a Snips assistant. In it, you specify:
The URL of your assistant, as created in the Snips Console
The skills you want to install
Bindings between intents and skills
If required, additional parameters for you skill, such as an API key or the address of a lamp
Various configuration parameters, such as language and logging preferences.
Check out Awesome Snips, a curated list of Snips skills, assistants and other resources to get you started. In particular, make sure to read the Getting Started guide.
Getting Started
Prerequisites
Raspbian
Depending on your setup, you may need to update pip, and install some packages via apt-get.
$ sudo apt-get update
$ sudo apt-get install python-pip libsdl-mixer1.2 libusb-1.0 python-pyaudio libsdl1.2-dev cython cython3 libudev-dev python-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsmpeg-dev python-numpy libportmidi-dev libswscale-dev libavformat-dev libavcodec-dev portaudio19-dev nodejs build-essential -y
macOS
On macOS, PyAudio and SDL are required.:
$ sudo easy_install pip
$ pip install --global-option='build_ext' --global-option='-I/usr/local/include' --global-option='-L/usr/local/lib' pyaudio
$ brew install sdl
Installation
We suggest installing and running Snips Skills using a virtualenv to avoid granting root privileges, and ensure your setup does not break when other packages are installed:
$ sudo pip install --upgrade virtualenv
$ virtualenv --python=/usr/bin/python2.7 snips
$ source snips/bin/activate
You may exit the virtualenv by running deactivate.
We are now ready to install the snipsskills package. Make sure pip is up to date:
$ pip install pip --upgrade
$ pip install snipsskills
Installing without virtualenv
If you do not wish to use a virtualenv, you need to run the pip commands with root privileges:
$ sudo pip install pip --upgrade
$ sudo pip install snipsskills
Usage
Start your project by creating a Snipsfile, which is where all the configuration is set. This is a simple text file, adhering to the YAML format. Here is a basic configuration:
assistant: SNIPS_ASSISTANT_URL
locale: en_US
logging: True
default_location: Paris,fr
skills:
- package_name: snipshue
class_name: SnipsHue
pip: snipshue=0.1.2
params:
hostname: PHILIPS_HUE_IP
username: PHILIPS_HUE_USERNAME
light_ids: [1, 2, 3, 4, 5, 6]
intents:
- intent: DeactivateObject
action: "turn_off"
- intent: ActivateLightColor
action: "turn_on"
For further explanations and examples, check out our Snipsfile Wiki.
Next, setup the system by running the install command:
$ snipsskills install
You may need to restart your device. We are now ready to start the service, using the run command:
$ snipsskills run
Contributing
Please see the Contribution Guidelines.
Copyright
This skill is provided by Snips as Open Source software. See LICENSE.txt for more information.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for snipsskills-0.1.5-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3288af152b9973bc4c906450a0d0f1c3f6326b8a5b14e8a33da3020259891d19 |
|
MD5 | 3a6567c3c843060a4e08d734d8359488 |
|
BLAKE2b-256 | 8607f89f743414bcfe1703df836ea83d04f900f301c18c56566939364ae30ab8 |