concept developer in category alexa

This is an excerpt from Manning's book Voice Applications for Alexa and Google Assistant.
A useful way to think about it is that voice first shifts the burden away from users and onto developers and designers. Think about all of the ways we “help” users on the web, and consider how we can do the same thing with voice first, as in figure 1.1.
Before we go on to make more complex skills, let’s revisit how we created our first skill. We went to the Amazon Developer Console and we went to the AWS console; in short, we did a lot of work in the browser. Developers generally prefer to avoid going into the browser for configuration unless necessary. Thankfully, the Alexa Skills Kit Command Line Interface (ASK CLI) allows us to develop our skills locally, without heading out to the Developer Console, which permits a more efficient development cycle.
Listing 10.1 Using the
SimpleResponsehelper (index.js)const {dialogflow, SimpleResponse} = require("actions-on-google"); #1 ... app.intent("office_locations", (conv, {room}) => { ... const displayTexts = { kitchen: "The kitchen is to your left and then a right. " + #2 "Grab a snack or a drink, on the house.", #2 "supply closet": "For the supply closet, you'll go all the way around " + #2 "until you reach the developers. " + #2 "Find the cleaning supplies, paper, and paper clips.", #2 "meeting room": "Look to your right and you'll see the meeting room. " + #2 "This meeting room seats six people and you can " + #2 "book it online." #2 }; const displayText = displayTexts[room]; #3 conv.close(new SimpleResponse({ #4 speech: response, #4 text: displayText #4 })); #4 }); #1 Imports SimpleResponse helper #2 Specifies the responses we’ll display on the screen #3 The chosen response for the currently requested concept #4 Sends both speech and text