Coder Social home page Coder Social logo

huyle93 / mapout Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 1.0 202 KB

Hackathon Winning Voice Application

License: Apache License 2.0

JavaScript 14.54% TypeScript 85.46%
hackathon alexa-skill alexa-sdk alexa-voice-service aws-lambda skill-architecture custom-slot xml amazon xml-rss

mapout's Introduction

Alexa Dev Guideline


Project Description

This is the complete project of building flash briefing skill and a custom interactive skill for Alexa. The custom interactive skill is also linked to the Alexa mobile app which showing image cards.


Table of contents


Quick Start

Amazon Developer Portal is the home of you Alexa skill. This is where you create the skill, manage skill information and information of your Lambda Function. In Alexa development, this service is called Skill Interface.

AWS Lambda is a service to implement your code or function without running on a server. In Alexa developement, this service is called Skill Service

AWS S3 Amazon requires all contents that used in Alexa skill is accessed by HTTPS so S3 is the best solution for the Alexa skill's content cloud storage

Alexa Voice Service (AVS) is Amazon’s intelligent voice recognition and natural language understanding service that allows you as a developer to voice-enable any connected device that has a microphone and speaker.

Adding package.json "npm init"

Adding alexa sdk into your package.json using "npm install --save alexa-sdk"

{
  "name": "hacklbm",
  "version": "1.0.0",
  "description": "hi there. this is an interactive skills for amazon alexa echo built on node.js 6.10, serviced by AWS Lambda and Amazon Developer Portal. [email protected]",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "repository": {
    "type": "git",
    "url": "yourrepo"
  },
  "keywords": [
    "alexa"
  ],
  "author": "huy le [email protected]",
  "license": "ISC",
  "dependencies": {
    "alexa-sdk": "^1.0.11"
  }
}

Running "npm install" to add node_modules


Folder Structure

Alexa-Project/
├── skill/
│   ├── intentSchema/
│   │   └── intentSchema.JSON
│   ├── speechAssets/
│   │   ├── budgeting_Tips.txt
│   │   ├── investing_Tips.txt
│   │   └── utterances.txt
│   ├── src/
│   │   └──index.js
└── flash-briefing/
    ├── speechAssets/
    │   └── audio.mp3
    └── src/
        ├── content.json
        └── my-audio-content.xml

Flash Briefing

A Flash Briefing provides a quick overview of news and other content such as comedy, interviews, and lists that a customer discovers and enables in the Skills section of the Alexa app

https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/understanding-the-flash-briefing-skill-api

Alexa Flash Briefing Feeds can be built by XML RSS or JSON. The content of the feeds need to be stored on HTTPS. In this project, I store them on AWS S3.

For this skill, I use XML RSS to implement the news. The XML file need to follow the feed reference of Amazon and W3 XML RSS 2.0.

Amazon Flash Briefing Feed Reference

XML RSS 2.0 Specs

Sample XML RSS Feed item for Alexa:

<item>
    <link>https://www.quora.com/</link>
    <guid isPermaLink="false">this_is_a_unique_string_when_isPermaLink_false_just_to_make_for_keep_track_of_the_content</guid>
    <title>Developer news</title>
    <description>&lt;p&gt;Latest news for developers on Quora&amp;nbsp;&lt;/p&gt;</description>
    <pubDate>Mon, 17 Jul 2017 21:40:22 +0000</pubDate>
    <category>general:products/aws-lambda,marketing:marchitecture/compute,general:products/amazon-cloudfront</category>
    <author>[email protected]</author>
</item>


Skill Architecture

https://developer.amazon.com/alexa-skills-kit#learn

Alexa Skill Flow:

  • New Session
  • Launch Request (Invoke the skill without intent or data such as Alexa [Invocation Name], ex: Alexa, ask MyMoney)
  • Intent Request (Calling the [Invocation Name] with the intent of doing something, ex: Alexa, ask MyMoney for budgeting tips)
  • Session Ended Request (Exiting skill)

Custom Slot

Amazon Slot Reference

File Format

/speechAssets .txt .mp3

/src Node.js 6.10

/intentSchema JSON

/imageAssets .png .jpg


Developer Note

All content files are hosted on AWS S3 [email protected] in f4m bucket

flash briefing skill is on [email protected] Amazon Developer account, named: beta prototype

src node.js is hosted on AWS Lambda, huy's account.

flash-briefing note: prefer XML format over JSON


Creators

Huy Le

[email protected]


Copyright and license

Huy Le 2018

mapout's People

Contributors

ab116893 avatar huyle93 avatar jcb1023 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ab116893

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.