Code Monkey home page Code Monkey logo

alexa-grammar's Introduction

alexa-grammar NPM version Build Status Dependency Status Coverage percentage


Utilities and framework code for building valid grammars and skill kits for Amazon's Alexa voice agent service.

Install

$ npm install --save alexa-grammar

Usage

Example 1: Basic Usage

var alexaGrammar = require('alexa-grammar');
var results = alexaGrammar.compile('<public|private|internal|protected> [abstract] [<virtual|sealed>] int Compute(), topics);

Example 2: Array of Models and Topic Set Usage

var alexaGrammar = require('alexa-grammar');

var topics = {
  airline: {
    type: 'dictionary',
    count: 100,
    entries: [
      { id: 'aal', values: ['aa', 'american airlines', 'american'] },
      { id: 'dal', values: ['dl', 'delta airlines', 'delta'] },
      { id: 'ual', values: ['ua', 'united airlines', 'united'] },
      { id: 'asa', values: ['as', 'alaska airlines', 'alaska'] }
    ]
  }
};
var results = alexaGrammar.compile(['Find flights [<from | on | by>] {airline}', '{airline} flights'], topics);

Introduction to Alexa Skills

Alexa, the voice service that powers Echo, provides a set of built-in abilities, or skills, that enable customers to interact with devices in a more intuitive way using voice. Examples of these skills include the ability to play music, answer general questions, set an alarm or timer and more. With the Alexa Skills Kit, you can easily build and add your own skills to Alexa. Customers can access these new skills simply by asking Alexa a question or making a command.

Developers can create their own implementations of Alexa skills. This involves building and packaging an Alexa skill as a configuration and implementing a backend service that interacts based on this definition.

The configuration for an Alexa skill must include the following components to define the voice interface:

An Intent Schema: A JSON structure which declares the set of intents your service can accept and process. A set of Sample Utterances: A structured text file that connects the intents to likely spoken phrases and containing as many representative phrases as possible. These inputs are entered in the Interaction Model section of an Alexa skill configuration.

License

This code is licensed under the MIT license for Scott Beaudreau. For more information, please refer to the LICENSE file.

alexa-grammar's People

Contributors

scottbea avatar

Watchers

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