The easiest way to get started with the Alexa AudioPlayer
Bespoken Tools provides Alexa skill developer tools and an all-in-one Alexa skills lifecycle management platform with logging, metrics, APM and analytics services.
The project has no code dependencies, uses no frameworks, and is meant to illustrate as simply and transparently as possible how the AudioPlayer works. We hope you find it useful!
What does this Alexa skill play do?
- It plays an introduction to the user explaining how it works
- It plays a hard-coded Alexa skill play MP3 audio file when the user says “Play”
- It can Pause and Resume, using a simple in-memory cache
How can I use the AudioPlayer?
Short answer — any way that you want 😉
Really, though, this is meant as a starting point for people wanting to understand how the AudioPlayer works and do some basic things with it.
For that reason, it is heavily stripped down so that you can see the behavior up-close, without frameworks getting in the way. For example, here is the code for playing a track:
As you can see, the distance between the code and the raw Alexa skill JSON is absolutely minimal.
What is next for Alexa skills?
We plan on expanding on this project, evolving this simple example into a fully functional player. With each addition, it will still be possible to easily access the previous, simpler version. We hope this incremental approach keeps the project simultaneously easy to understand while also guiding readers to a full-fledged implementation.
Features we plan to add:
- Use of Playlists
- Saving state with DynamoDB
- Unit Testing
- Shuffle and loop
Get the skills you need for a better career.
Master modern tech skills, get certified, and level up your career. Whether you’re starting out or a seasoned pro, you can learn by doing and advance your career in cloud with ACG.
Let us know if there are other aspects you would like to see covered — we welcome the input! Just comment below. And watch or follow the project here.