Embedding mp3 audio into your voice interface can be done using SSML (Speech Synthesis Markup Language). MP3 audio might be used in a voice interface for intro music, sound effects, and recorded voices.
Including audio in your Voice design
1. Encode your mp3 to make it compatible.
You'll have to convert MP3 files to codec version MPEG version 2, bit rate 48 kbps, sample rate 16000 Hz.
2. Host your encoded mp3. Grab the link to the file.
You must host your mp3 at an internet-accessible HTTPS. The domain hosting MUST have a valid, trusted SSL certificate.
3. Insert your sound using simple SSML.
We also include a sample of SSML in our audio converter. Write your speech inside the speech brackets. Embed your mp3 in the audio brackets. Follow the lead of the example below.
Welcome to this Skill.
<audio src="https://s3-us-west-1.amazonaws.com/sayspring-prod/media/celtic-open-chime.mp3" />
What would you like to do?
The audio clip will now play as part of the response in your project.
Some important limitations to note.
- You can use up to 5 audio tags in one singular response.
- The time used by all your audio files can’t be more than 90 seconds cumulatively.