All Projects → Xzya → alexa-typescript-starter

Xzya / alexa-typescript-starter

Licence: MIT license
This is a simple starter project for Alexa skills using Typescript.

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to alexa-typescript-starter

alexa-skill-heytube
Alexa Skills to Play a Single Audio or Multiple Audio from YouTube Videos
Stars: ✭ 26 (-31.58%)
Mutual labels:  alexa, alexa-skill, ask-sdk
Squeeze Alexa
Squeezebox integration for Amazon Alexa
Stars: ✭ 54 (+42.11%)
Mutual labels:  alexa, alexa-skill
Alexa Monzo
Monzo Skill for the Amazon Alexa
Stars: ✭ 49 (+28.95%)
Mutual labels:  alexa, alexa-skill
Jovo Framework
🔈 The Open Source Voice Layer: Build Voice Experiences for Alexa, Google Assistant, Samsung Bixby, Web Apps, and much more
Stars: ✭ 1,320 (+3373.68%)
Mutual labels:  alexa, alexa-skill
Awesome Amazon Alexa
🗣Curated list of awesome resources for the Amazon Alexa platform.
Stars: ✭ 458 (+1105.26%)
Mutual labels:  alexa, alexa-skill
Alexa Skills Kit Sdk For Python
The Alexa Skills Kit SDK for Python helps you get a skill up and running quickly, letting you focus on skill logic instead of boilerplate code.
Stars: ✭ 678 (+1684.21%)
Mutual labels:  alexa, alexa-skill
Amazon Alexa Php
Php library for amazon echo (alexa) skill development.
Stars: ✭ 93 (+144.74%)
Mutual labels:  alexa, alexa-skill
home assistant appdaemon alexa google
An AppDaemon application for Home Assistant, handles calls from Alexa Skill and a Google Action
Stars: ✭ 11 (-71.05%)
Mutual labels:  alexa, alexa-skill
Voicewp
Create Alexa Skills through WordPress
Stars: ✭ 132 (+247.37%)
Mutual labels:  alexa, alexa-skill
Awesome Voice Apps
🕶 A curated list of awesome voice projects, tools, and resources for Amazon Alexa, Google Assistant, and more.
Stars: ✭ 138 (+263.16%)
Mutual labels:  alexa, alexa-skill
ask-toolkit-for-vscode
ASK Toolkit is an extension for Visual Studio Code (VSC) that that makes it easier for developers to develop and deploy Alexa Skills.
Stars: ✭ 90 (+136.84%)
Mutual labels:  alexa, alexa-skill
Alexa Skill Kit
Library for effortless Alexa Skill development with AWS Lambda
Stars: ✭ 278 (+631.58%)
Mutual labels:  alexa, alexa-skill
SinricPro Generic
Simple way to control your IOT development boards like ESP8226, ESP32, Arduino SAMD21, Adafruit SAMD21, SAMD51, nRF52, STM32, Teensy, SAM DUE with Amazon Alexa or Google Home
Stars: ✭ 18 (-52.63%)
Mutual labels:  alexa, alexa-skill
Alexa Soundcloud
soundcloud integration for alexa
Stars: ✭ 47 (+23.68%)
Mutual labels:  alexa, alexa-skill
alexa-skill-clean-code-template
Alexa Skill Template with clean code (eslint, sonar), testing (unit tests, e2e), multi-language, Alexa Presentation Language (APL) and In-Skill Purchases (ISP) support. Updated to ASK-CLI V2.
Stars: ✭ 34 (-10.53%)
Mutual labels:  alexa, alexa-skill
Alexacontrolledsamsungtv
Control your Samsung smart TV via amazon alexa
Stars: ✭ 73 (+92.11%)
Mutual labels:  alexa, alexa-skill
Alexaskillskit
Swift library to develop custom Alexa Skills
Stars: ✭ 160 (+321.05%)
Mutual labels:  alexa, alexa-skill
alexa-skill-boilerplate
An easy to use Amazon Alexa Skill Boilerplate for fast skill creation
Stars: ✭ 54 (+42.11%)
Mutual labels:  alexa, alexa-skill
alexa-conversation
Framework to easily test your Alexa skills functionally by creating a conversation with your skill.
Stars: ✭ 51 (+34.21%)
Mutual labels:  alexa, alexa-skill
Alexafsm
With alexafsm, developers can model dialog agents with first-class concepts such as states, attributes, transition, and actions. alexafsm also provides visualization and other tools to help understand, test, debug, and maintain complex FSM conversations.
Stars: ✭ 103 (+171.05%)
Mutual labels:  alexa, alexa-skill

Build Status codecov

Alexa Skill starter project using AWS Lambda and Typescript

This is a simple starter project for Alexa skills using Typescript.

What is included in the project

  • Default request handlers
Name
LaunchRequest
SessionEndedRequest
System.ExceptionEncountered
AMAZON.HelpIntent
AMAZON.StopIntent and AMAZON.CancelIntent
AMAZON.FallbackIntent
  • Extra handlers
Name Description
HelloWorld Triggered when the user says "hello", will answer back with "hello".
Debug Can be placed at the beginning of the request handlers stack and it will print the handlerInput. Useful for debugging.
  • Error handlers
Name Description
Unexpected Catches ErrorTypes.Unexpected, which should be thrown when...something unexpected happens. It will tell the user something unexpected happend, and to try again later.
Unknown Catches all other errors. It will tell the user it didn't understand the command, and to try saying it again (doesn't end session).
  • Request interceptors
Name Description
Localization Adds i18next localization functions to the RequestAttributes.
Slots Parses the slot values, adds additional useful information to them (e.g. if it was an exact match, or if it's ambiguous etc.), and adds them to the RequestAttributes. Check the GetSlotValues function inside lambda/custom/lib/helpers.ts for more details.
  • Localization strings

Check lambda/custom/lib/strings.ts.

  • Constants

Including the String keys, so you can have type safety everywhere.

Check lambda/custom/lib/constants.ts.

  • Helper functions

Many helper functions which should reduce code duplication, and reduce the code needed to do common tasks.

Check lambda/custom/lib/helpers.ts.

  • Local development

Contains an http server using express, which you can use with ngrok or servo.net during local development. Check the Local development section below for more details.

  • Scripts

There are a few scripts inside package.json for building and deploying your lambda function using the ask-cli. Check the Developer tasks section below for more details.

  • Tests

The project contains automated tests using jest. Check the __tests__ folder.

$ npm run test

If you want to include code coverage, run

$ npm run test:coverage

You can also start jest in watch mode:

$ npm run test:watch
  • Travis CI and Codecov integrations

Pre-requisites

Installation

  • Install the dependencies
$ 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. Navigate to the project's root directory. you should see a file named 'skill.json' there.

  2. Deploy the skill and the Lambda function in one step by running the following command:

$ ask deploy

Local development

In order to develop locally and see your changes reflected instantly, you will need to create an SSH tunnel or expose somehow your local development server. There are several services that allow you to do this, for example ngrok or serveo.net.

Using servo.net

This is the easiest to setup

  1. You need to have an SSH client installed, then simply run
$ ssh -R 80:localhost:3980 serveo.net
Forwarding HTTP traffic from [https://YOUR_URL]
Press g to start a GUI session and ctrl-c to quit.
  1. Once you see the URL, copy it and go to your Skill console.

  2. Open the Endpoint menu and select HTTPS

  3. Under Default Region paste the previous URL you copied.

  4. On the select box choose: My development endpoint is a sub-domain of a domain that has a wildcard certificate from a certificate authority.

  5. You are done! Just run npm start to start the local server and begin testing the skill.

Using ngrok.io

  1. Install ngrok

  2. Run ngrok http 3980

  3. Copy the URL and follow the same steps above from 3 to 6.

Developer tasks

Command Description
clean Deletes the dist folder
build Builds the lambda function and exports it to the dist folder
deploy Builds the lambda function and deploys EVERYTHING (skill, model, lambda)
deploy:lambda Builds the lambda function and deploys it (just the lambda function)
deploy:local Deploys the skill details for the local profile, which will update the HTTPS endpoint
start Starts the local express server using nodemon for local development

To see the actual commands, check package.json.

Also check the ASK CLI Command Reference for more details on using the ASK CLI.

Testing

Taken from the official hello world project.

  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 (this might take a few moments) using the following example:

     $ ask simulate -l en-US -t "open greeter"
    
     ✓ 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, or through your Amazon Mobile App and say :

    Alexa, start hello world
    

Customization

Taken from the official hello world project.

  1. ./skill.json

    Change the skill name, example phrase, icons, testing instructions etc ...

    Remember than many information are locale-specific and must be changed for each locale (e.g. en-US, en-GB, de-DE, etc.)

    See the Skill Manifest Documentation for more information.

  2. ./lambda/custom/index.ts

    Modify messages, and data 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.

  4. Remember to re-deploy your skill and Lambda function for your changes to take effect.

    $ npm run deploy

License

Open sourced under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].