Photo by Mick Haupt on Unsplash

Randomizing Alexa Responses with APL-A

An Alexa Skill Building Video Tutorial

Craig Walls
2 min readJul 22, 2022

--

https://pragprog.com/newsletter/

In traditional user interfaces, we expect consistency. If an application’s buttons, labels, checkboxes, and other widgets are located in different places each time we use an application, it can get frustrating and make the application difficult to use.

In voice user interfaces, however, inconsistency can improve the user experience. By having Alexa speak her replies using different phrasings each time, she can seem less repetitive and more lifelike. What’s more, by switching things up with each response, it can subtly force the user to be more attentive to what Alexa is saying and less likely to tune out the very information that they asked Alexa to provide.

In this video, I show how to use the Alexa Presentation Language for Audio, or APL-A, to produce a variety of responses from Alexa. And, as a bonus, I also show how to use APL-A’s Mixer component to add a background sound effect along with the spoken reply.

If you enjoyed this post, you might also enjoy Build Talking Apps for Alexa by Craig Walls, now available in beta from The Pragmatic Bookshelf:

In honor of the Alexa Live 2022 event, you can use promo code ALEXALIVE2022 at checkout to save 35% on the ebook through July 22nd.

--

--