Giter VIP home page Giter VIP logo

firstalexaskills's Introduction

FirstAlexaSkills - A Python package for learning first steps with Alexa skills

https://travis-ci.org/means-to-meaning/FirstAlexaSkills.svg?branch=master Documentation Status

Welcome to the wonderful world of Alexa interactions! Do you have great ideas for teaching Alexa new skills? There are only two steps to make a third-party skill using the Alexa Skills Kit:

  • creating an Alexa skill (ASK) which will convert your speech into intents (think of them as events for now) which you define - by associating utterances (sentences) to intents. For more details, take a look at the official ASK starter guide.
  • creating an AWS Lambda function or a web service that will receive the intents from Alexa. This package uses AWS Lambda functions because they are ideal for simple functions - low cost and zero infrastructure maintainance. You can find the official documentation here. If you are interested in a web service approach to ASK with Python, then you should definitely try John Wheeler's great flask-ask package.

You can install FirstAlexaSkills with:

$ pip install firstalexaskills

You will also need to setup credentials to use AWS Lambda from to console and a developer account to create an Alexa skill. For more details, see the installation guide.

Here is all it takes to create, upload, test, modify, re-upload and re-test your first AWS Lambda skill function with AlexaFirstSkills:

$ mkdir alexa_development
$ unpack_example_skills # unpacks Alexa skill examples to ./example_skills
$ cd example_skills # Explore the Alexa skills in this directory
$ cd alexa_skill_first # Once ready, create your own AWS Lambda function
$ create_lambda_function --function-name skill_first --dir .
Function succesfully created!
AWS Lambda function ARN: arn:aws:lambda:your_aws_region:your_account_id:function:skill_first
$ test_lambda_function --function-name skill_first --test-data tests/data/lambda_test_data.json
... test output ...
$ idle lambda_function.py # modify the skill
$ update_lambda_function --function-name skill_first --dir . # update function in the cloud
$ test_lambda_function --function-name skill_first --test-data tests/data/lambda_test_data.json
... test updated output ...

You can install FirstAlexaSkills with:

$ pip install FirstAlexaSkills

You will also need to setup credentials to use AWS Lambda from to console and a developer account to create an Alexa skill. For more details, see the installation guide.

The package contains example Alexa skills, utilities and tutorials that will guide you from simply getting the Echo to reply, to setting your home temperature using the IoT device of your choice. Most importantly though, it allows you to develop locally, sync your local Lambda function to the cloud and immediately test it using a fake Alexa event in one button press. Something that might come in handy when building your own skills later.

New to programming, or Python? Checkout the 15 minute mini-intro! If you are thinking of setting up a hackathon to develop some new third-party Alexa skills, this guide has you covered!

Discussion

If you run into any issues you can file them in the issue tracker.

firstalexaskills's People

Contributors

christos-c avatar means-to-meaning avatar

Stargazers

 avatar

Watchers

 avatar  avatar

firstalexaskills's Issues

Format function reply to Alexa events as JSON

Firing multiple events at the function should result in a formatted reply
That will make it easier to test the reply against reference data (instead of the current multiline test reply)

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.