Giter VIP home page Giter VIP logo

alexa-recipe-reader's Introduction

Recipe Reader Alexa skill

Utilizes Amazon built-in audio directive intents (play, next, repeat, etc.) to let the user navigate a list of instructions. Example skill written in Python, based off of Amazon's Custom Skill example. Utilizes Amazon DynamoDB to 'give Alexa a memory' across sessions.

Setup

  1. Clone the repository
  2. Create the skill interaction model using intent_schema.json and utterances.txt.
  • Use en-US language.
  • Create a custom slot type called RECIPE_LIST with slot values dance and song.
  1. Create a Python language Amazon Lambda using lambda_function.py.
  • Be sure to also upload recipes.json and silent_48k.mp3. The included prep.zip file makes uploading these files as a single zip archive very easy.
  • Set the following environmental variables: | Variable Name | Value Description | | :--- | :--- | | SKILL_ID | Synchronize with your Alexa Skilly ID | | VERSION | Version number of your function. Kind of optional. | | STEP_HISTORY_TABLE | Name of a DynamoDB table indexed on {S: userID } and secondary sort index {N: time } | | STEP_LAST_TABLE | Name of a DynamoDB indexed on {S: userID } | AWS_KEY_ID | Amazon AWS Key ID that provides access to DynamoDB. | | AWS_SECRET | Amazon AWS secret that matches AWS_KEY_ID. |
  1. Configure skill with Python Lambda ARN. Account linking is not needed.
  2. Create a two DynamoDB tables in the same availability zone as where your Lambda is located:
  • One table indexed on {S: userID }. This table will be used as Alexa's memory between user sessions, to remember where the user left off the last completed step of the most recent recipe.
  • A second table indexed on {S: userID } and secondary sort index {N: time }. This table will be used to log activity for later study.
  1. Test and enjoy!

Recipe Store recipes.json

This file contains the recipes utilized by the skill, in JSON. Recipe object names should match the slot values of RECIPE_LIST as configured above. Recipe objects have the following layout:

{
  "recipe name":{
    "title": "[will be shown in skill cards]",
    "intro": "[read at the beginning of the recipe]",
    "conclusion": "[read at the end of the recipe]",
    "prerequisites": ["items", "read off at", "the beginning"],
    "recipe": [
      {"instruction": "[text read to the user describing the first step]", "estimated_time": "5s"},
      {"instruction": "[text read to the user describing the second step]", "estimated_time": "5s"},
      {"instruction": "[etc. etc. sequentially]", "estimated_time": "5s"}
    ]
  }
}

The instruction objects within the recipe list are sequential. The estimated_time string within each instruction object determines how long Alexa pauses for after reading the step, to provide the user time to complete it. Current max pause time is 10 seconds.

Using Audio Player Voice Directives

Once inside the skill, the user can utilize audio directives to navigate back and forth along the recipe's sequence of instructions.

alexa-recipe-reader's People

Contributors

ajfranke avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  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.