From 6b6347e6cbdda4bdd983e308fd5fe24c27458d15 Mon Sep 17 00:00:00 2001 From: akersh-s Date: Tue, 7 Nov 2017 12:46:04 -0800 Subject: [PATCH] New Splash Page --- README.md | 148 ++++++++++++++++++++++++++++++++-------- instructions/0-intro.md | 39 +++++++++++ 2 files changed, 160 insertions(+), 27 deletions(-) create mode 100644 instructions/0-intro.md diff --git a/README.md b/README.md index 055d429a..bd7f5b0d 100644 --- a/README.md +++ b/README.md @@ -1,39 +1,133 @@ -# Build An Alexa Fact Skill +Regions: πŸ‡―πŸ‡΅ + + +# Build An Alexa Fact Skill πŸ‡ΊπŸ‡Έ -[![Voice User Interface](https://m.media-amazon.com/images/G/01/mobile-apps/dex/alexa/alexa-skills-kit/tutorials/navigation/1-off._TTH_.png)](instructions/1-voice-user-interface.md)[![Lambda Function](https://m.media-amazon.com/images/G/01/mobile-apps/dex/alexa/alexa-skills-kit/tutorials/navigation/2-off._TTH_.png)](instructions/2-lambda-function.md)[![Connect VUI to Code](https://m.media-amazon.com/images/G/01/mobile-apps/dex/alexa/alexa-skills-kit/tutorials/navigation/3-off._TTH_.png)](instructions/3-connect-vui-to-code.md)[![Testing](https://m.media-amazon.com/images/G/01/mobile-apps/dex/alexa/alexa-skills-kit/tutorials/navigation/4-off._TTH_.png)](instructions/4-testing.md)[![Customization](https://m.media-amazon.com/images/G/01/mobile-apps/dex/alexa/alexa-skills-kit/tutorials/navigation/5-off._TTH_.png)](instructions/5-customization.md)[![Publication](https://m.media-amazon.com/images/G/01/mobile-apps/dex/alexa/alexa-skills-kit/tutorials/navigation/6-off._TTH_.png)](instructions/6-publication.md) -## What You Will Learn -* AWS Lambda -* Alexa Skills Kit (ASK) -* Skill Builder -* Voice User Interface (VUI) Design -* Skill Certification +This Alexa sample skill is a template for a basic fact skill. Provided a list of interesting facts about a topic, Alexa will select a fact at random and tell it to the user when the skill is invoked. + +If you would like to see an example of this skill in action, you can enable the [Gloucester Facts](https://www.amazon.com/Robert-McCauley-Gloucester-Facts/dp/B01I5MOIA2/) from the [Alexa Skill Store](http://amazon.com/skills). + + + +If this is your first time here, you're new to Alexa Skills Development, or you're looking for more detailed instructions -- click the **Get Started** button below: + +

+ +

+ + +Be sure to take a look at the Additional Resources at the bottom of this page! + + +## About +**Note:** This readme assumes you have your developer environment ready to go and that you have some familiarity with CLI Tools, AWS, and the ASK Developer Portal. If not, click here and get started with a detailed walkthrough. + + + +### Usage + +```text +Alexa, ask Space Facts for a fact + >> Here's your fact: A year on Mercury is just 88 days long. + +Alexa, start Space Facts +``` + +### Repository Contents +* /.ask - CLI Configuration +* /lambda - 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-fact/ + ``` + +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-fact + $ ask init + ``` + +3. Install npm dependencies by navigating into the `/lambda` directory and running the npm command: `npm install` + + ```bash + $ cd lambda + $ 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-GB -t "alexa, start space facts" + + βœ“ 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 space facts + ``` + + + +## Customization -## What You Will Need -* [Amazon Developer Portal Account](http://developer.amazon.com) -* [Amazon Web Services Account](http://aws.amazon.com/) -* The sample code on [GitHub](https://github.com/alexa/skill-sample-nodejs-fact). -* Simple graphical editing tool -* At least 25 facts about your favorite topic. +1. ```./skill.json``` -## What Your Skill Will Do -A fact skill for Alexa is a "Hello, World" example. You provide a list of interesting facts about a topic, and Alexa will read one of those facts to your user when they start your skill. The purpose of building this skill is to teach you how the different pieces of the Alexa development process fit together, while still producing an interesting, useful skill that others can enjoy. + Change the skill name, example phrase, icons, testing instructions etc ... -This Alexa skill template helps you create your first fact skill. Your users will be able to say things like: + Remember than many information are locale-specific and must be changed for each locale (en-GB and en-US) -* "Alexa, ask Superhero Facts for a new fact." -* "Alexa, start Baseball Facts." -* "Alexa, ask Titanic Facts to give me another fact." + See the Skill [Manifest Documentation](https://developer.amazon.com/docs/smapi/skill-manifest.html) for more information. -Alexa will respond to all of these requests with responses like these: +2. ```./lambda/src/index.js``` -* "Here's your superhero fact: Iron Man's armor used to include roller skates." -* "Here's your baseball fact: Ralph Kiner is the only player ever to lead the league in homers for seven years in a row β€” his first seven years as a major league player." -* "Here's your Titanic fact: The ship burned around 600 tons of coal a day – hand shoveled into its furnaces by a team of 176 men. Almost 100 tons of ash were ejected into the sea each day." + Modify messages, and facts from the source code to customize the skill. -If you would like to see an example of this skill in action, you can enable the [Gloucester Facts](https://www.amazon.com/Robert-McCauley-Gloucester-Facts/dp/B01I5MOIA2/) from the [Alexa Skill Store](http://amazon.com/skills). +3. ```./models/*.json``` - + Change the model defintion 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 +* [5 Minute Quick Start Tutorial](https://developer.amazon.com/alexa-skills-kit/alexa-skill-quick-start-tutorial) +* Voice Design Guide +* CodeAcademy +* Hackster.io +* DevPost +* Official Alexa Skills Kit Node.js SDK \ No newline at end of file diff --git a/instructions/0-intro.md b/instructions/0-intro.md new file mode 100644 index 00000000..055d429a --- /dev/null +++ b/instructions/0-intro.md @@ -0,0 +1,39 @@ +# Build An Alexa Fact Skill + + +[![Voice User Interface](https://m.media-amazon.com/images/G/01/mobile-apps/dex/alexa/alexa-skills-kit/tutorials/navigation/1-off._TTH_.png)](instructions/1-voice-user-interface.md)[![Lambda Function](https://m.media-amazon.com/images/G/01/mobile-apps/dex/alexa/alexa-skills-kit/tutorials/navigation/2-off._TTH_.png)](instructions/2-lambda-function.md)[![Connect VUI to Code](https://m.media-amazon.com/images/G/01/mobile-apps/dex/alexa/alexa-skills-kit/tutorials/navigation/3-off._TTH_.png)](instructions/3-connect-vui-to-code.md)[![Testing](https://m.media-amazon.com/images/G/01/mobile-apps/dex/alexa/alexa-skills-kit/tutorials/navigation/4-off._TTH_.png)](instructions/4-testing.md)[![Customization](https://m.media-amazon.com/images/G/01/mobile-apps/dex/alexa/alexa-skills-kit/tutorials/navigation/5-off._TTH_.png)](instructions/5-customization.md)[![Publication](https://m.media-amazon.com/images/G/01/mobile-apps/dex/alexa/alexa-skills-kit/tutorials/navigation/6-off._TTH_.png)](instructions/6-publication.md) + +## What You Will Learn +* AWS Lambda +* Alexa Skills Kit (ASK) +* Skill Builder +* Voice User Interface (VUI) Design +* Skill Certification + +## What You Will Need +* [Amazon Developer Portal Account](http://developer.amazon.com) +* [Amazon Web Services Account](http://aws.amazon.com/) +* The sample code on [GitHub](https://github.com/alexa/skill-sample-nodejs-fact). +* Simple graphical editing tool +* At least 25 facts about your favorite topic. + +## What Your Skill Will Do +A fact skill for Alexa is a "Hello, World" example. You provide a list of interesting facts about a topic, and Alexa will read one of those facts to your user when they start your skill. The purpose of building this skill is to teach you how the different pieces of the Alexa development process fit together, while still producing an interesting, useful skill that others can enjoy. + +This Alexa skill template helps you create your first fact skill. Your users will be able to say things like: + +* "Alexa, ask Superhero Facts for a new fact." +* "Alexa, start Baseball Facts." +* "Alexa, ask Titanic Facts to give me another fact." + +Alexa will respond to all of these requests with responses like these: + +* "Here's your superhero fact: Iron Man's armor used to include roller skates." +* "Here's your baseball fact: Ralph Kiner is the only player ever to lead the league in homers for seven years in a row β€” his first seven years as a major league player." +* "Here's your Titanic fact: The ship burned around 600 tons of coal a day – hand shoveled into its furnaces by a team of 176 men. Almost 100 tons of ash were ejected into the sea each day." + +If you would like to see an example of this skill in action, you can enable the [Gloucester Facts](https://www.amazon.com/Robert-McCauley-Gloucester-Facts/dp/B01I5MOIA2/) from the [Alexa Skill Store](http://amazon.com/skills). + + + +