Things used in this project

Hardware components:
Amazon Alexa Amazon Echo
Or any other Alexa enabled device.
Software apps and online services:
Screen%20shot%202015 07 20%20at%206.10.26%20pm
Amazon Web Services AWS Lambda
Dp image kit 02
Amazon Alexa Alexa Skills Kit


Sample Code for Using SpeechconJavaScript
    'AMAZON.YesIntent': function() {
        console.log('Preparing to pitch');

        // gather current state of the game
        var inning      = this.attributes["inning"];
        var atBat       = this.attributes["visitorBatter"];
        var batterName  = visitorLineup[atBat-1].lastName
        var pitcherName = homeLineup[8].lastName;

        var audioOutput = pitcherName + " takes the mound in the top of the " + inning + "th inning. ";
            audioOutput = audioOutput + "<break time=\"1s\"/>";
            audioOutput = audioOutput + "Now batting is " + batterName + ". ";
            audioOutput = audioOutput + "<break time=\"1s\"/>";
            audioOutput = audioOutput + "<say-as interpret-as=\"interjection\">batter up</say-as>";
            audioOutput = audioOutput + "<break time=\"1s\"/>";
            audioOutput = audioOutput + "Select a pitch to throw to the batter. ";

        var repromptOutput = "Try saying Fastball, Curve, Slider, or Change-up.";

        // reset the bases
        this.attributes["balls"]   = 0;
        this.attributes["strikes"] = 0;
        this.attributes["runnerOnFirst"]  = false;
        this.attributes["runnerOnSecond"] = false;
        this.attributes["runnerOnThird"]  = false;

        VoiceInsights.track('firstPitch', null, 'middleFastball', (error, response) => {
            this.emit(':ask', audioOutput, repromptOutput);


Terren Peterson

Life-long learner who started off with an Electrical Engineering degree, but have been in software and systems engineering my whole career.



Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback


Similar projects you might like

Iron-Rich Foods!
  • 58
  • 3

A necessary skill for all people with iron deficiencies. It's always hard to find foods that are rich in iron. Until now. Just ask Alexa!

Movie Quotes Trivia
  • 24
  • 2

Full instructions

Test your knowledge of great movies by matching five famous movies quotes. It will be great fun activities among famaly and friends.

Wise Quotes
  • 133
  • 3

Full instructions

More than 100 wise quotes to empower you everyday.

Wildlife Facts Skill
  • 53
  • 2

Learn more about wildlife animals with more than 200 interesting facts with this Alexa skill.

Compost Helper Alexa Skill
  • 152
  • 3

Use Alexa to find out if a household item can be added to your compost.

Ferrari Facts
  • 272
  • 4

Full instructions

learn about the most expensive cars in the world with Ferrari Facts you you will know some interesting facts that you probably didn't hear a

Add projectSign up / Login