Welcome to day 4 of our 30-day skill challenge. Today we'll be teaching Chatterbox how to play music for the entire family.
It's time to get the party started! We've covered the basics of getting Chatterbox to Listen, Speak and look up information from the internet. Now let's teach Chatterbox to be your own personal DJ or radio host.
One of the most important parts of skill design is to understand how people speak. People don't just ask for things using the same words every time. It's important that you ask people around you to see how they might ask for music differently from the way you do.
Try to find at least 3 people and ask them how they would ask you to play their favorite song:
Listen to [song name]
Play the song [song name]
Play my favorite song
In the above examples, one of the utterances is not like the others. "Play my favorite song" doesn't include or need a song name because generally people only have a single favorite song.
Before we can make Chatterbox play audio, we need to first enable the Audio extension from the Extension page.
Once enabled, you'll have access to the Audio block list in the Skill Builder. The specific block that we'll be using for this skill is the Play audio block.
This is a somewhat "smart" block that knows how to play specific files or will even try playing audio from a URL. This block knows how to play songs from Youtube and will stop playing once the song is over.
For this example we are going to be using Happy by Pharrell. A quick Google search comes up with this as the first result.
The link is: https://www.youtube.com/watch?v=y6Sxv-sUYtM
We're almost done! But we are missing one last piece. It's always good to have Chatterbox respond to commands. This lets the user know that Chatterbox heard them correctly.
Let's add a Speak block that says "Ok, playing the Happy song by Pharrell."
Now that you've finished the skill, click Deploy and give it a go!
What's your favorite song? Can you build a skill for all the songs that you love to listen to? We can't wait to hear the fun songs you'll use! Please remember to tag us @hellochatterbox using #ChatterboxSkillChallenge. Happy Learning!