Giter Club home page Giter Club logo

voice-assistant-js's Introduction

voice-assistant-js

one client library to rule them all (api-ai, google-action, alexa, ...)

Build Status Coverage Status npm GitHub license

Installation

$ yarn add voice-assistant-js

then you should install the client library you want.

  • actions-on-google and express if you want to use api-ai or google-actions

  • alexa-sdk if you want to use alexa

Usage

Implementations

  • alexa sdk
  • google action sdk
  • api-ai over google-action

on aws lamda

make sure you use at least node-6.10

require('reflect-metadata')
const lambda = require('voice-assistant-js').lambda

class IntentClass {
  /**
   * @param {IEvent} event
   */
  say (event) {
    event.tell('say')
  }
  
  /**
   * @param {IEvent} event
   */
  ask (event) {
    event.ask('ask')
  }
}

const mapping = {
  say: IntentClass,
  ask: IntentClass
}

exports.handler = lambda(mapping)

so if you the lamda is invoked with the intent ask the function IntentClass.ask is called...

on google-cloud-functions

//TODO

Test

$ yarn test

TODOS

  • event construction with DI factory (so we can get rid of the specific handler classes)
  • i18n
  • cards
  • forms
  • dialogs
  • error-handling
  • google-cloud-function

voice-assistant-js's People

Contributors

digitalkaoz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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