GithubHelp home page GithubHelp logo

isabella232 / snips-demo-dev-kit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from snipsco/snips-demo-dev-kit

0.0 0.0 0.0 2.66 MB

Official action code for Snips Voice Interaction Development Kit. (Temperature & Relay)

License: MIT License

Shell 11.78% Python 88.22%

snips-demo-dev-kit's Introduction

MIT License Version

snips-demo-dev-kit

Official action code for Snips Voice Interaction Development Kit.

It's composed of snips-app-relay-switch and snips-app-sht31, enables you to control the connected relay module and fetch the indoor environment informations.

Usage

πŸ’‘ Controlling a connected device

"Hey snips, please turn on my light"

"Hey snips, please turn off my light"

β›„ Asking for temperature

"Hey snips, please tell me the current temperature?"

🎍 Asking for humidity

"Hey snips, what's the humidity in the room?"

Installation

Pre-required

Please make sure that _snips-skills user has permission to access gpio and i2c.

To grant this permission, run the following command on Raspberry Pi:

sudo usermod -a -G i2c,spi,gpio,audio _snips-skills

If install to a satellite device, please make sure it has snips-skill-server installed first.

To install snips-skill-server:

sudo apt-get install snips-skill-server

With Assistant (Recommend)

  1. Create a Snips account here

  1. Create an assistant in Snips Console

  1. Add Voice Interaction Dev Kit App to your assistant

  1. Deploy assistant by executing the provided command on your laptop

Only action code

Using sam to fetch the content of this repo on your laptop

sam install actions -g https://github.com/snipsco/snips-demo-dev-kit.git

Manually

  1. Clone the content of this repo to local:
git clone https://github.com/snipsco/snips-demo-dev-kit.git
  1. Run setup.sh to install:
cd snips-demo-dev-kit/
./setup.sh
  1. Activate virtual environment:
source venv/bin/activate
  1. Run the action code:
./action-demo_dev_kit.py

Configurations

Connection

Config Description Value Default
mqtt_host MQTT host name <ip address>/<hostname> localhost
mqtt_port MQTT port number <mqtt port> 1883
site_id Snips device ID Refering to the actual snips.toml default
‼️ If this skill is installed on a satellite device, please change the site_id to the one set for satellite, and change mqtt_host connecting to master device.

TTS language

Config Description Value Default
locale The tts language en_US, fr_FR en_US

NOTE: Japanese text-to-speech is not yet supported, which means that adding Japanese translation will block snips-tts software

Relay GPIO pin

Config Description Value Default
relay_gpio_bcm The BCM GPIO number Available BCM pin number 12

Temperature Unit

Config Description Value Default
temperature_unit The unit applied to temperature celsius, fahrenheit celsius

Contributing

Please see the Contribution Guidelines.

Copyright

This library is provided by Snips as Open Source software. See LICENSE for more information.

snips-demo-dev-kit's People

Contributors

coorfun avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.