Home

Awesome

Build An Alexa Pet Match Skill πŸ‡ΊπŸ‡Έ

<img src="https://m.media-amazon.com/images/G/01/mobile-apps/dex/alexa/alexa-skills-kit/tutorials/quiz-game/header._TTH_.png" />

NOTE: This project uses Dialog Management. If you're looking for Pet Match with Alexa Conversations Please see: skill-sample-nodejs-alexa-conversations-pet-match. Learn Alexa Conversations with Tutorial: Build Multi-turn Skills with Alexa Conversations.

Overview

In this workshop you will create a skill called Pet Match that matches the user with a pet. When launched, this Alexa Skill will prompt the user for the information it needs to determine a match. Once all of the required information is collected, it will send the data to an external web service which processes the data and returns the match.

Through this workshop, you'll learn how to use advanced Alexa Skills Kit features to create and configure an Alexa Skill. The features you'll learn to use are Dialog Management and Entity Resolution. These features leverage Alexa's Automatic Speech Recognition (ASR), Natural Language Understanding (NLU), and Machine Learning (ML), which makes your life easier because you don't have to write code. You only need to provide training data to the Alexa engines via your interaction model. The skill builder makes it easy to do so.

To Get Started click the button below:

Get Started

Additional Resources

Community

Tutorials & Guides

Documentation

<!-- # Conversation and Memory ## Pet Match <img src="https://m.media-amazon.com/images/G/01/mobile-apps/dex/alexa/alexa-skills-kit/tutorials/quiz-game/header._TTH_.png" /> [![Part 1: Build and Customize](https://m.media-amazon.com/images/G/01/mobile-apps/dex/alexa/alexa-skills-kit/tutorials/tutorial-page-marker-1-off._TTH_.png)](./instructions/1-build-and-customize.md)[![Entity Resolution](https://m.media-amazon.com/images/G/01/mobile-apps/dex/alexa/alexa-skills-kit/tutorials/tutorial-page-marker-2-off._TTH_.png)](./instructions/2-entity-resolution.md)[![Memory](https://m.media-amazon.com/images/G/01/mobile-apps/dex/alexa/alexa-skills-kit/tutorials/tutorial-page-marker-3-off._TTH_.png)](./instructions/3-memory.md) --> <!-- ## Pre-requistes In order to start working on this workshop you will need: * <a href="https://aws.amazon.com" target="_new">AWS Account</a> * <a href="https://developer.amazon.com" target="_new">Amazon Developer Account</a> ## Get Started The workshop is composed of three parts: * Part 1: Build and Customize Pet match * Part 2: Entity Resolution * Part 3: Memory Each part contains a set of tasks that act as check points, and extra credit that will present a challenge that will further enhance your learning. **Note** You may use Pet Match as a starting point to build your own skill that needs to collect information form the user and have processed via a web service. You can customize the slots to match the data you need and change the hostname to the web service you need to call. If this is your first time here, you're new to Alexa Skills Development, you're interested in the "extra credit", or you're looking for more detailed instructions, click the **Get Started** button below: <p align='center'> <a href='./instructions/1-build-and-customize.md'><img src='https://camo.githubusercontent.com/db9b9ce26327ad3bac57ec4daf0961a382d75790/68747470733a2f2f6d2e6d656469612d616d617a6f6e2e636f6d2f696d616765732f472f30312f6d6f62696c652d617070732f6465782f616c6578612f616c6578612d736b696c6c732d6b69742f7475746f7269616c732f67656e6572616c2f627574746f6e732f627574746f6e5f6765745f737461727465642e5f5454485f2e706e67'></a> </p> Be sure to take a look at the [Additional Resources](#additional-resources) at the bottom of this page! ## About **Note:** The rest of this readme assumes you have your developer environment ready to go and that you have some familiarity with CLI (Command Line Interface) Tools, [AWS](https://aws.amazon.com/), and the [ASK Developer Portal](https://developer.amazon.com/alexa-skills-kit). If not, [click here](./instructions/1-build-and-customize.md) for a more detailed walkthrough. ### Usage ```text Alexa, ask pet match find a pet. >> Welcome to pet match. I can help you find the best dog for you. What are two things you are looking for in a dog? Alexa, open pet match ``` ### Repository Contents * `/.ask` - [ASK CLI (Command Line Interface) Configuration](https://developer.amazon.com/docs/smapi/ask-cli-intro.html) * `/lambda/custom` - Back-End Logic for the Alexa Skill hosted on [AWS Lambda](https://aws.amazon.com/lambda/) * `/models` - Voice User Interface and Language Specific Interaction Models * `/instructions` - Step-by-Step Instructions for Getting Started * `skill.json` - [Skill Manifest](https://developer.amazon.com/docs/smapi/skill-manifest.html) ## Setup w/ ASK CLI ### Pre-requisites * Node.js (> v4.3) * Register for an [AWS Account](https://aws.amazon.com/) * Register for an [Amazon Developer Account](https://developer.amazon.com/) * Install and Setup [ASK CLI](https://developer.amazon.com/docs/smapi/quick-start-alexa-skills-kit-command-line-interface.html) ### Installation 1. Clone the repository. ```bash $ git clone https://github.com/alexa/skill-sample-nodejs-petmatch/ ``` 2. Initiatialize the [ASK CLI](https://developer.amazon.com/docs/smapi/quick-start-alexa-skills-kit-command-line-interface.html) by Navigating into the repository and running npm command: `ask init`. Follow the prompts. ```bash $ cd skill-sample-nodejs-petmatch $ ask init ``` 3. Install npm dependencies by navigating into the `/lambda` directory and running the npm command: `npm install` ```bash $ cd lambda/custom $ npm install ``` ### Deployment ASK CLI will create the skill and the lambda function for you. The Lambda function will be created in ```us-east-1 (Northern Virginia)``` by default. 1. Deploy the skill and the lambda function in one step by running the following command: ```bash $ ask deploy ``` ### Testing 1. To test, you need to login to Alexa Developer Console, and enable the "Test" switch on your skill from the "Test" Tab. 2. Simulate verbal interaction with your skill through the command line using the following example: ```bash $ ask simulate -l en-US -t "alexa, start pet match" βœ“ Simulation created for simulation id: 4a7a9ed8-94b2-40c0-b3bd-fb63d9887fa7 β—‘ Waiting for simulation response{ "status": "SUCCESSFUL", ... ``` 3. Once the "Test" switch is enabled, your skill can be tested on devices associated with the developer account as well. Speak to Alexa from any enabled device, from your browser at [echosim.io](https://echosim.io/welcome), or through your Amazon Mobile App and say : ```text Alexa, start pet match ``` ## Customization 1. ```./skill.json``` Change the skill name, example phrase, icons, testing instructions etc ... Remember that many information is locale-specific and must be changed for each locale (en-GB and en-US) See the Skill [Manifest Documentation](https://developer.amazon.com/docs/smapi/skill-manifest.html) for more information. 2. ```./lambda/custom/index.js``` Modify messages, and facts from the source code to customize the skill. 3. ```./models/*.json``` Change the model definition to replace the invocation name and the sample phrase for each intent. Repeat the operation for each locale you are planning to support. ## Additional Resources ### Community * [Amazon Developer Forums](https://forums.developer.amazon.com/spaces/165/index.html) - Join the conversation! * [Hackster.io](https://www.hackster.io/amazon-alexa) - See what others are building with Alexa. ### Tutorials & Guides * [Voice Design Guide](https://developer.amazon.com/designing-for-voice/) - A great resource for learning conversational and voice user interface design. * [CodeAcademy: Learn Alexa](https://www.codecademy.com/learn/learn-alexa) - Learn how to build an Alexa Skill from within your browser with this beginner friendly tutorial on CodeAcademy! ### Documentation * [Official Alexa Skills Kit Documentation](https://developer.amazon.com/docs/ask-overviews/build-skills-with-the-alexa-skills-kit.html) - Official Alexa Skills Kit Documentation * [Official Alexa Skills Kit Node.js SDK](https://www.npmjs.com/package/ask-sdk) - The Official Node.js SDK Documentation