Inspiration
It all began with that dreaded conversation with your child before heading out on a business trip - who’s going to read to me my favorite bed time stories? Even worse. I won’t be able to call during bed time because I will be on a different time zone and stuck in meetings. So I decided the best way to resolve this is by recording myself reading the stories and have Alexa play them back whenever my little one wants.
How I built it
I built a website hosted in S3 to allow me to upload audio recordings from anywhere to S3. As well as an image to display on the Alexa spot or show. I store the audio and images in a non-public S3 bucket and generate presigned urls to Alexa. The user only has access to their recordings. This is accomplished via the account linking using logon with Alexa. I store the customer Id in a DynamoDB along with a reference to each of their uploaded recordings in S3.
Challenges I ran into
Some of the challenges I ran into was dealing with design decisions. For example, how to best serve up the audio files for Alexa from any number of audio sources. This required normalizing audio that users could potentially upload from an iPhone, Android, and/or Windows PC. I was able to resolve this by using Elastic Transcoder to transcode any audio input into the MP3 audio file format supported by Alexa. Similarly, I had to deal with normalizing images from high resolution cameras. I solved this by writing a Lambda function that resized the image to one that best suited Alexa. Finally, the other challenge was to decide how users will make a selection of a story with their voice. Should it be free form using the QuerySearch? Or should I standardize on a list of values using slots. I ultimately decided to use slot values representing the numeric value of the story within the list. This decision was an easy one considering the primary listener of my app will be toddlers who, let's admit, Alexa would have a tough time understanding.
As for the primary reason for this challenge - APL. I had issues with adding ExecutionCamands to the APL to animate my list of stories. I eventually found the Karaoke sample that I reverse engineered to set the appropriate metadata for my template.
Accomplishments that I'm proud of
I am very proud to write an app that my family uses day to day and one that evokes so much emotion to those who use it. One example, I would like to share is when I shared the app with family over the holidays. While I was away on my business trip I was fortunate to meet up with my father - I should add that he is not in the best health. I had him record a story to read to my daughter. I played this on the Tuck Me In Alexa App for my family and there was not a dry eye in the house.
What I learned
I learned with the right idea and with Amazon’s plethora of powerful services anything is possible. I could not have had as quick of a turn around without Amazon’s web Services. This is even more important to those of us who have day jobs and can only code on late night's and weekends.
I also learned there is a size limit to API Gateway's Binary payload! Initially, that one took me a while to stumble through. I eventually had to make use of the JavaScript SDK.
APL-wize, I found it to be very flexible and runs deep. I felt like I only scratched the surface.
What's next for Tuck Me In
Once the Tuck Me In Skill is published I plan on updating it to allow users to ask for which story to play as part of the initial invocation. In addition, allow users to ask the skill to play the most recent story. Long-term, I could foresee expending out to playing close caption videos. All the tools are there with Media Convert and Transcribe. Imagine if your child could see your expressions, with the text overlay!
Thank You!
I would like to take a moment to thank you for putting this challenge together. The support forums were very helpful and the tickets that I did submit for bugs did get a quick response and resolution. In addition, I am hoping this and future challenges will bring more exposure to the hard work those of us weekend/weeknight warriors put in. We work so hard and find very little time between work and family balance. I am just happy my weekend project benefited my family in the process!
Thanks for your consideration,
Robb & Family
Built With
- amazon-alexa
- amazon-api-gateway
- amazon-dynamodb
- amazon-elastic-transcoder
- amazon-web-services
- lambda
- login-with-amazon
- python

Log in or sign up for Devpost to join the conversation.