My son is currently turning 5 and I thought I could help him develop his skills in identifying animals by just a sound clip. He is really interested in animals in farms, watching animals on programs on tv, so I thought this was an ideal opportunity to develop his skills and help other children develop their skills.
What it does
The skill is comprised of 10 questions, these questions and answers are dynamically made from a GIT repository holding all the sounds and a JSON file referencing these files. Each question will play a random sound and will say three answers, whereby one of these answers are correct. The user will answer the question and the app will respond if the answer was correct or incorrect, the skill will also create a card detailing the correct answer to the Alexa application. In total the skill at the moment has 52 animal sounds.
How I built it
The Alexa skill has been built with Node.js and deployed to AWS lambda. On skill startup a JSON file is requested and downloaded from the GIT repository. On each consecutive question, it retrieves a random question from the JSON array. The JSON array holds all questions as well as the URL to the sound on the GIT repository, once a question has been selected, two other answers are randomly selected.
The application has been built with a GIT repository (https://github.com/robbalmbra1/AnimalSounds) in mind so that additional sound clips and animal information can be added to the repo without tweaking the code within the lambda instance, this allowing the Alexa skill to support more than 10 questions to the user playing.
Packages and Software used
The alexa-sdk was used as a development framework and allowed me to use other packages within various intents, such as: ssml-builder, request-promise, random-int and lower-case.
Challenges I ran into
Originally I needed somewhere to host the images, sounds and JSON file. Eventually, I found that I could use a git repository through GIT hub to host these files.
Accomplishments that I'm proud of
Making a skill that is aimed at children, this is the first skill that I have made aimed at children. Its been interesting to build this skill.
What I learned
By finding out that there is an ASK CLI able to upload lambda code and skill information. I decided to make a frontend within a shell script to create the required models and skills manifest to create skills quicker and easier (https://github.com/robbalmbra1/AlexaBasicTemplate). With this working, I was able to use the Mocha test framework to test skill intents and slots offline, this was helpful and productive.
What's next for Name that Animal
More animal sounds to be supported and adaptions for other animal skills, such as 'Name that Bird'.
A portfolio of my work can be accessed here: https://alexa.sandr-photography.com