How to Add Sound Effects to your Alexa Skill

I was learning how to add audio clips to an Alexa skill today, and it’s simpler than I was expecting! I thought I would have to memorize 20 lines of code, but it’s not that difficult.

Here is a quick overview:
Sound effects are a great way to enhance your user’s skill experience. For example, let’s say you want to create a trivia skill. Whenever the user answers correctly, you play the sound of someone clapping. If they answer incorrectly, you play the sound of a buzzer. This would be a great use for sound effects.

The Alexa Skills Kit (ASK) SDK makes adding short audio clips very simple. All you need is the SSML audio tag.

<audio src=""/>


There are a few requirements for audio clips to work on Alexa-enabled devices.

  1. 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.
  2. The MP3 must not contain any customer-specific or other sensitive information.
  3. The MP3 must be a valid MP3 file (MPEG version 2).
  4. The audio file cannot be longer than 240 seconds.
  5. The bit rate must be 48 kbps.
  6. The sample rate must be 22050Hz, 24000Hz, or 16000Hz.

You can easily convert an audio file into the Alexa-friendly format using tools such as Audacity, FFmpeg, etc. Personally, I prefer using an online converter made by Jovo.

How to use:

You can create a new skill or you can add sound effects to your current skill.

  1. Create a regular fact skill. If you don’t know how to create one, Amazon has an awesome tutorial for you.
  2. Decide where you want to place your audio. You might want to add audio to the stop message or maybe the start message.
  3. Then, click on the Services tab in the top left corner, near the AWS logo. Type S3 in the search box and choose the first option.
  4. Then click on “Create a New Bucket” and type in your bucket name. The name of the bucket should be simple.
  5. Click “Next” twice and then click Create Bucket.
  6. Click on “Upload” to upload an MP3 file.
  7. Next, click on your file. There should be an Object URL. Copy that code. Then, go back to your Lambda function.
  8. Place this code in your chosen message: ‘<audio src=”″/>’.
  9. Save and test!

I hope you have a clearer understanding of adding sound effects to your Alexa skills. They can greatly improve your skill and make it more likable and fun.

Written by

Aariv Modi

37   Posts

Aariv Modi is a blogger, programmer, Alexa skill developer, and AI enthusiast. He is in 9th grade at Round Rock High School and has created several Alexa skills and mobile apps. Aariv was recognized as the Voice/AI Pioneer of the Year by Project Voice in 2021 for his contributions to the conversational artificial intelligence industry. He is also the youngest AWS Certified Alexa Skill Builder and AWS Certified Machine Learning professional. Aariv has contributed much of his learning with the Alexa and voice community through his blog and social media channels such as LinkedIn, YouTube, and Twitter. During the COVID-19 lockdown, he taught hundreds of kids how to develop Alexa skills through webinars, camps, and posts on his website. He was the youngest presenter at several international voice and AI conferences, such as Project Voice 2020, VOICE Global 2020, and VOICE Summit 2020.
View All Posts

One thought on “How to Add Sound Effects to your Alexa Skill

  1. Hi There, Aariv! Thank you for this tutorial.

    I was wondering where the sample code for your skill was since it is now 404’d.

    Thank you!

Leave a Reply

Your email address will not be published. Required fields are marked *