All Projects → terrenjpeterson → guitarteacher

terrenjpeterson / guitarteacher

Licence: other
Guitar Teacher skill for the Amazon Alexa platform

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to guitarteacher

Alexaskillskit
Swift library to develop custom Alexa Skills
Stars: ✭ 160 (+900%)
Mutual labels:  lambda, alexa-skills-kit, alexa-skill
alexa-libby
A skill to ask Alexa about your Movie and TV Show library queues.
Stars: ✭ 48 (+200%)
Mutual labels:  lambda, alexa-skills-kit, alexa-skill
Echo Sonos
Amazon Echo integration with Sonos
Stars: ✭ 722 (+4412.5%)
Mutual labels:  alexa-skills-kit, alexa-skill
Ask Cli
Alexa Skills Kit Command Line Interface
Stars: ✭ 100 (+525%)
Mutual labels:  alexa-skills-kit, alexa-skill
Cookbook
Alexa Skill Building Cookbook
Stars: ✭ 50 (+212.5%)
Mutual labels:  lambda, alexa-skills-kit
Awesome Amazon Alexa
🗣Curated list of awesome resources for the Amazon Alexa platform.
Stars: ✭ 458 (+2762.5%)
Mutual labels:  alexa-skills-kit, alexa-skill
Stealth
An open source Ruby framework for text and voice chatbots. 🤖
Stars: ✭ 481 (+2906.25%)
Mutual labels:  alexa-skills-kit, alexa-skill
Alexa Monzo
Monzo Skill for the Amazon Alexa
Stars: ✭ 49 (+206.25%)
Mutual labels:  lambda, alexa-skill
alexa-tesla
Alexa Skills Kit (ASK) project - Tesla monitoring and control for Amazon Echo devices
Stars: ✭ 23 (+43.75%)
Mutual labels:  alexa-skills-kit, alexa-skill
alexa-ruby
Ruby toolkit for Amazon Alexa service
Stars: ✭ 17 (+6.25%)
Mutual labels:  alexa-skills-kit, 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 (+462.5%)
Mutual labels:  alexa-skills-kit, alexa-skill
alexa-skill-test-framework
Framework for easy offline black-box testing of Alexa skills.
Stars: ✭ 64 (+300%)
Mutual labels:  alexa-skills-kit, alexa-skill
Alexa Assistant
Implementation of the Google Assistant SDK as an Alexa skill
Stars: ✭ 422 (+2537.5%)
Mutual labels:  alexa-skills-kit, alexa-skill
Kanzi
Alexa skill for controlling Kodi
Stars: ✭ 412 (+2475%)
Mutual labels:  alexa-skills-kit, 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 (+4137.5%)
Mutual labels:  alexa-skills-kit, alexa-skill
Alexa Skill Kit
Library for effortless Alexa Skill development with AWS Lambda
Stars: ✭ 278 (+1637.5%)
Mutual labels:  alexa-skills-kit, alexa-skill
cookiecutter-flask-ask
Cookiecutter template for Alexa skills based on the fantastic Flask-Ask framework 🍾🗣❓
Stars: ✭ 51 (+218.75%)
Mutual labels:  alexa-skills-kit, alexa-skill
Azure4Alexa
Create and Host Alexa Custom Skills using .NET and Azure
Stars: ✭ 48 (+200%)
Mutual labels:  alexa-skills-kit, alexa-skill
serverless-alexa-skills
Manage your Alexa Skills with Serverless Framework
Stars: ✭ 69 (+331.25%)
Mutual labels:  alexa-skills-kit, alexa-skill
GoblinDB
Fear the Goblin! - An amazing, simple and fun database for humans
Stars: ✭ 54 (+237.5%)
Mutual labels:  lambda

Guitar Teacher Skill

This is an Alexa skill that provides instruction in how to play a guitar.

Table of Contents

Graphics

The Icons that are used in the Amazon Alexa skill store are found in the /graphics folder. These are used when publishing the skill.

The notations for playing the different chords are stored in a folder in S3. There is a naming notation to them that maps to the code within the skill. This includes a suffix of -small.PNG vs. -large.PNG matching the format required by Alexa. So when the user requests a different note or chord to be played, the response dynamically changes to include the note. Here is the helper function that processes this logic, and the note - i.e. the objectName - is what gets passed in.

var noteLib = "https://s3.amazonaws.com/musicmakerskill/guitar/"; // this is the folder in the s3 bucket where all images are stored.

function buildAudioCardResponse(title, output, cardInfo, objectName, repromptText, shouldEndSession) {
    var smallImagePath = noteLib + "small-images/" + objectName + "-small.PNG";
    var largeImagePath = noteLib + "large-images/" + objectName + "-large.PNG";
    return {
        outputSpeech: {
            type: "SSML",
            ssml: output
        },
        card: {
            type: "Standard",
            title: title,
            text: cardInfo,
            image: {
                smallImageUrl: smallImagePath,
                largeImageUrl: largeImagePath
            }
        },
        reprompt: {
            outputSpeech: {
                type: "PlainText",
                text: repromptText
            }
        },
        shouldEndSession: shouldEndSession
    };
}

NLU Models

The intent schema, custom slots, sample utterances, and other data attributes in the NLU models are stored in the /models folder. This includes two custom slots, one with the notes in the scale, the other of the major and minor chord names that this skill teaches.

How to Play MP3 files in a Skill

Throughout this skill, the voice of Alexa is combined with guitar playing. This is done using SSML - Speech Synthesis Markup Language. An example of this is in the introduction. Here is the markup syntax that integrates the two.

var audioOutput = "<speak>";
    audioOutput = audioOutput +  "Welcome to Guitar Teacher.";
    audioOutput = audioOutput + "<audio src=\"https://s3.amazonaws.com/musicmakerskill/guitar/homeOnTheRange.mp3\" />";
    audioOutput = audioOutput + "Your tool for learning how to play the guitar. " + 
        "To get started, you can say Teach Notes, Teach Chords, Play Guitar, or Tune Guitar. " +
        "If you want more detailed instructions, say Help.";
    audioOutput = audioOutput + "</speak>";

var repromptText = "Please start by saying something like Play Guitar";
buildAudioResponse(cardTitle, audioOutput, cardOutput, repromptText, shouldEndSession));

The markup needs to have "speak" notated to indicate that SSML will be used. Then within the SSML, use the markup "audio src="https://s3.aws.../file.mp3"" to provide the location of the mp3 file.

For an example of a skill using the current version of the NodeJS SDK, please use this repo.

How to Save Session Data

The Alexa request/response model has the ability to save state within the message being passed back and forth to the device. So while the Lambda function may be stateless, the state is actually within the message. This is how when playing multiple strings in a dialog with a user, the skill knows which was the last string played.

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