Responding to your users with Voice Apps is really easy, but incredibly powerful. Here's everything you need to know to build engaging interactions into your skills.
We're talking about the Responses tab of the Intent Editor if you aren't already there.
Response Groups are nothing more than a collection of responses. Within a response group, you can give one or more voice responses (what Alexa says) and one or more audio responses (sounds and music).
To add a new Response Group, click on the Response Group icon at the bottom of the Responses tab of the Intent Editor.
Active On Visit X to Y
Voice Apps keep an internal count of each time the user launches your skill. Each launch is another visit.
You can set a response group to only activate on a specific visit or range of visits by the user.
This allows you to create advanced interactions like providing a long welcome message the first time they use your skill, welcome them back the second time they use your skill and give them shorter instructions, and then just welcome them back after that.
Another great use of this function is to ask for reviews. You can have a response group in your "Goodbye" intent that will ask nicely for a review on the 10th visit, for example.
To delete a Response Group, click the trash can icon at the top right of the Response Group.
When you start building more advanced skills that keep track of how many times the user has answered correctly in a trivia game, or whether or not they've found the hammer in an adventure game, you'll find this feature incredibly valuable.
You can specify that the response group is only active when a specific condition is met. For example, in an escape the room skill, the user might examine the safe. If the safe hasn't been opened, you might describe the combination lock and explain that it's locked. If, however, the user has already opened the safe, you might respond with the details of the contents of the safe.
For more details on setting these conditions and variables, see the Variables training.
Within each response group, you can have one or more voice responses from Alexa.
To add a new Voice Response to a Response Group, click on the Voice Response icon underneath the responses window.
In the "What should Alexa say?" box, enter the text you want Alexa to speak.
You can use SSML in this text to change the pitch of Alexa's voice, insert short breaks, show excitement, and many other tricks.
You can also enter additional phrases and Voice Apps will pick one randomly. This makes your skill much more engaging and less like a robot.
If you have many phrases to enter, you can click the little truck icon to bulk upload your phrases instead of entering them one by one.
To delete a Voice Response, click the trash icon at the top right of the Voice Response.
You can also include one or more short audio responses in a response group.
To add a new Audio Response to a Response Group, click on the Audio Response icon underneath the responses window.
In the "Enter audio URL" box, type or paste the url to the MP3 audio file you wish to play.
The audio and URL must meet these requirements:
- The MP3 must be hosted at an Internet-accessible HTTPS endpoint. HTTPS is required, and the domain hosting the MP3 file must present a valid, trusted SSL certificate. Self-signed certificates cannot be used.
- The MP3 must not contain any customer-specific or other sensitive information.
- The MP3 must be a valid MP3 file (MPEG version 2).
- The audio file cannot be longer than ninety (90) seconds.
- The bit rate must be 48 kbps. Note that this bit rate gives a good result when used with spoken content, but is generally not a high enough quality for music.
- The sample rate must be 16000 Hz.
You can enter additional URLs and Voice Apps will choose one of them randomly. This is great for keeping the content fresh by presenting dynamic sound effects to your users.
To delete an Audio Response, click the trash can icon at the top right of the Audio Response.