Making a Sound

Ultimately, the goal of producing an APL-A template is to produce some speech or sounds that will be returned as part a skill response. For this purpose, APL-A offers two fundamental components that make sound—Speech and Audio—and a third component that intentionally doesn’t make any sound. These components are:

  • Speech—Causes Alexa to speak some given text or SSML

  • Audio—Plays an sound effect from Alexa’s soundbank or a custom MP3 from a given URL

  • Silence—Pauses silently for a given duration of time

The Speech component works much like the speak() method on the response builder in a request handler, accepting either plain-text for Alexa to speak or SSML to customize how Alexa speaks. The Audio component, on the other hand, plays ...

Get Build Talking Apps for Alexa now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.