Launching soon! AI Generated Art for Kids
shop

Cart

Secure checkout
0

On day 11 of our 30-day skill challenge, we'll be teaching Chatterbox how to search Duck Duck Go for extended answers regarding topics. Learn about the Spanish Inquisition or learn about the American Revolution.

We've previously taught Chatterbox how to answer specific questions about the height of the Empire State Building or the depth of the Pacific Ocean. But what if we wanted to learn more about a certain topic? One of the toughest parts of skill design is understanding where to go for answers that you need.

DuckDuckGo is a privacy-focused internet search engine.

In the case of needing an "extended answer" to a general topic or subject, we've built blocks to make it incredibly simple to search the internet using the Duck Duck Go search engine. Think of Duck Duck Go as a search engine, sort of like Google, but focused on privacy. This means that Duck Duck Go isn't collecting information about everything that you are interested in as well as everything that you are searching for. Yes, that is what search engines do! We'll be having an upcoming blog post on the importance of privacy.

Let's talk about intents

Let's talk about intents. If you wanted to know what the weather was, you may go to DarkSky to get the latest weather. But what if you wanted to listen to a song? You wouldn't go to DarkSky for that, right?!

The toughest part about creating "skills" for Chatterbox is understanding where to go for information or answers. For this skill, let's use the Easter Bunny as an example. What if you wanted an extended answer or synopsis about the Easter Bunny? Well, we made a block for that!

The Duck Duck Answer block let's you search the internet using Duck Duck Go privacy-focused search engine.

This block will give you a short answer about lots of different topics that you might have questions about.

Building the DuckDuckGo search skill

In the same we that we start most skills, we need to think about how we might "invoke" or activate the skill. For this example, we'll be using:

"Search duckduckgo for" [subject]

We'll need a variable to store the subject that we are searching for, so your skill may look similar to this.

"Search duckduckgo for" [subject]

The next step is to search for the subject using the Duckduckgo block to get an answer.

Something to keep in mind is that every API works in different ways. We've done our best to simplify this for you, but we want to make sure that you understand the subtleties of APIs.

When requesting an answer from the Duckduckgo block, there are things that it knows, but there are also things that it doesn't know. If Duckduckgo doesn't have an answer to a query (fancy word for question), then it might respond with the value "None."

Why this is important for us is that if there is an answer to our question, we want to speak it. But what we don't' get an answer to our question?

For this we will use a new block called an IF block, that lets us do one thing if an answer is found, and something else if no answer.

If there is an answer, speak the answer. If no answer, then speak "I'm sorry I don't know about that."

Putting it all together

Your final skill should look similar to this:

You should have two variables: a subject variable and an answer variable. After invoking the skill, you should set the answer variable to the result of the duck duck answer block.

If there is an answer, speak it, else have Chatterbox speak "I'm sorry I don't know about that."

On day 10 of our 30-day skill challenge, we'll be teaching Chatterbox how to get answers to life's toughest questions. We'll be able to find out the distance to the moon, calculate the number of days until Thanksgiving and get the answer to what is the meaning of life.

Today we are going to learn how to teach Chatterbox how to find answers to some of our toughest questions. So far we've learned how to make Chatterbox respond to commands and get information. But what happens if we want to find an answer to a more complicated question, such as "What states border California?"

Let's talk about questions

Before we go any further let's talk about questions. Before we start building a skill, it's important to understand the question being asked.

What states border California?

As humans, we are able to process most questions easily, but it's often harder to get computers to answer the same questions. In the example above, we are essentially asking 4 different questions:

What state is North of California? Oregon
What state is West of California? None
What state is South of California? None
What state or states are East of California? Nevada and Arizona

Even people might need a map for reference. It's simple to make a skill that listens for "What states border California?" But what if we wanted to change it to: "What states border Iowa?" How would we get this information without having to manually check each time, or even one time. How do we get computers do this? That's a much tougher question.

What is Wolfram Alpha?

As a skill designer, your thought process should be:

  1. What is the user asking?
  2. Where can I find the information that they are asking?
  3. How to properly respond for the user?

Most of the time, the hardest part of this process has to do with how to find an answer to their question. This is where an amazing company and Chatterbox Partner comes in.

Meet Wolfram Alpha. According to its website,

WolframAlpha is a computational knowledge engine or answer engine.

In other words, WolframAlpha has lots and lots of different information that can be mixed, matched and computed with each using WolframAlpha technology. What does this mean for us? It means that we can simply ask it all sorts of questions in plain speech and get exactly the answer that we were looking for. It's AMAZING!

Let's build the skill and try it out!

Building the 'Ask Wolfram Alpha' skill

First, make sure you have the Internet extension enabled from the Extensions page.

Next, we need to figure out people will invoke (invoke means trigger or activate) the skill. For this skill, we'll keep it simple and use "Ask wolfram alpha"

Remember the double-sided text block can be found in the Data block category

We'll be asking Wolfram Alpha all sorts of questions, so it's good practice to store these questions in a variable. Add the "question" variable to the When I hear block.

Adding the question variable let's you automatically store the question in a variable to use throughout your skill

Finally, we want to search the Internet category for the Wolfram Alpha Short Answer block. This block uses the Wolfram Alpha API to search for answers and calculations from the entire Wolfram Alpha service. What's great is that it returns an answer that Chatterbox can speak.

This expression makes Chatterbox speak the Wolfram Alpha answer to a question

Congratulations! You've just built a voice skill that integrates with the Wolfram Alpha API. Your final skill will look similar to this:

Special note: If you ask a question and Chatterbox responds with "Wolfram Alpha did not understand your input," it's because your question might have gotten cut off a little bit. To fix this, you can try speaking a little bit faster or you can shorten "Ask wolfram alpha" to "Ask wolfram" or whatever else you would like.

Trying out the Wolfram Alpha service with Chatterbox

You've just turned your Chatterbox into a mini-supercomputer that not too long ago, would've been nearly impossible to create. Below are some questions to get you going:

What is the distance to the Moon?
How deep is the Pacific Ocean?
How many days until Thanksgiving?
What is the meaning of life?
What are words that rhyme with banana?
What states border California?
Where in the world is Carmen Sandiego?
How much wood could a woodchuck chuck?
What is 45 times 67?

We hope you enjoy your supercharged Chatterbox!

On day 9 of our 30-day skill challenge, we'll be making a hand wash timer that you can groove to. We'll also be learning about Skill Design and how to make Chatterbox Stop Audio and Wait.

I think it is safe to say that we all have been washing our hands more than ever before in the history of humankind. The CDC (Center for Disease Control) recommends that you scrub your hands for 20 seconds or "Hum the "Happy Birthday" song from beginning to end twice."

I don't know about you, but I'm so tired of singing Happy Birthday that I don't even want to hear it on my birthday?!

That's why today we're going to make a hand wash timer that we can groove to...

How to think about Skill Design (part 1)

So far we've built a bunch of skills, but we haven't discuss the process of designing a skill.

There are 3 main parts to every skill:

  1. How to start (or invoke) the skill?
  2. What to do?
  3. How to respond to the user?

For our hand wash timer, it should follow something similar to:

  1. Say "Start hand wash timer"
  2. Play a song for 20 seconds
  3. Great job for washing your hand!

For the most part this is right. But if we think about it deeper, step #2 could involve multiple steps. Let's try this out in 3 steps.

How to start the Hand Wash Timer?

Just like we've done in previous skills, we are going to start with a Listen block. So far, we've used two different Listen blocks.

The When I hear block is listening for specific keywords or keyphrases to match, while the On phrases like block requires similar examples in order to "train" itself to understand the variances between.

For this skill we'll simply use: "Start hand wash timer"

What are we going to do?

When we say "Play a song for 20 seconds" are we doing one thing or are we doing multiple things? Turns out that language is a little bit tricky sometimes. Humans are able to understand multiple things all at once while computers need to be told all the steps. But if we look closer we'll see that there are extra steps.

"Play a song for 20 seconds" really means:

  1. Start playing song
  2. Wait for 20 seconds
  3. Stop playing song

Step 1: Luckily, we already know that the Play audio block is how we can easily play audio sounds. For this example we'll be using this song:

For this example:https://www.youtube.com/watch?v=_NNYI8VbFyY

Step 2: To make Chatterbox wait, you use the Wait block which you can find in the Actions category. This block will wait for an amount of seconds.

Step 3: We've learned how to start audio by playing it, but to Stop audio we need a different audio block. Use the audio block with a selector. Set the selector to STOP.

Responding to the User

After 20 seconds of music, we want Chatterbox to speak. For this we use the Speak block and enter what you want the message to be.


Putting it all together

Deploy the skill and try it out! If you didn't listen to the song yet, you're in for a nice surprise. 😀

On day 8 of our 30-day skill challenge, we'll be learning to control smart lights with magic spells from Harry Potter. This is a great skill for all the Potterheads out there to understand how Chatterbox "listens" to speech.

We know that many of you are huge Potterheads (aka Harry Potter fans). So we thought we'd get into creating magic spells to turn on and control smart lights.

What's a smart plug?

So far, we've been making skills that make Chatterbox do things or communicate with different sources of information. But to make Chatterbox control lights, you need additional hardware called "smart plugs" or "smart lightbulbs" that Chatterbox can communicate with.

The current smart plugs and lightbulbs that Chatterbox can communicate are made by TP-Link Kasa. In case you don't currently have these smart plugs, Amazon currently has a sale for 17% off a two-pack.

We love smart plugs because they can be used to control lights, appliances or anything with a power on/off switch. The rest of this tutorial will assume that you have set up and named your smart plugs.

Enable the Smart Lights Extension

Before we can begin building the skill, we need to first enable the Smart Light Extension to give us access to the Smart Light blocks.

Enable the Smart Lights Extension from the Extension page

Once the extension is enabled, you'll have access to all the Smart Light blocks. In this skill we are going to focus on two blocks: Turn on TP Link Smart Plug and Find TP Link Device with Name.

For this skill, you'll need both of these blocks.

The Turn on TP LInk Smart Plug block allows Chatterbox to send a signal to turn on or turn off any smart plug while the Find TP Link Device block, makes it easy to determine which plug you want to turn on/off.

Turn on lights by connecting the blocks and entering the name of your smart plug

How to design spells with Chatterbox

Source: https://weheartit.com/entry/236092564

If you're a "Potterhead," you know that the magic spell that Harry Potter used to light up his wand was "Lumos." To turn off the light, the spell was "Nox." We are going to teach Chatterbox how to respond to these spells.

For the purposes of this tutorial, when Chatterbox hears "Lumos," we want Chatterbox to respond and turn on the smart plug connected light.

The speak block responds to the command while the smart plug block turns on the device

How Chatterbox Understands Speech

Unlike other smart speakers, Chatterbox only listens when you push the big yellow button. When you push the button, Chatterbox starts listening and translates what it hears into text. If the text matches one of Chatterbox's commands, then it will speak or do whatever the skill says. If it doesn't match, then Chatterbox will respond with "I do not know how to answer that, please teach me."

What does this mean for making skills? Well, it means that while we try to guess how people will talk to Chatterbox, we also have to make sure that we test skills to ensure that Chatterbox will understand.

Turning ON lights with Lumos

Turning on lights using the magic spell "Lumos" is easy. Simply add it to the Listen block as pictured below. By deploying the skill and testing it, we can see that Chatterbox understands "Lumos" without a problem.

Saying "lumos" makes Chatterbox turn on lights

Turning OFF lights with Nox

Now that we can turn lights on, let's copy the same code to turn lights off. Make sure to change the keyword to "nox," the response to "Ok, turning off lights" and change the smart plug block to off.

Deploy the skill and try turning off the light. Did it work? NOPE! The reason is that when we say "nox," Chatterbox hears "knox." They sound the same but they aren't a match and therefore Chatterbox responds with the unknown message.

Using the chat window makes it easy to debug skills

In this scenario, this isn't much of a problem because we can simply add additional examples to the listen block to make it trigger. This was an easy fix but in the future we'll be getting into trickier situations to make Chatterbox understand human speech.

While magic spells are wonderful for turning lights on and off, not everyone knows all the spells, so it's always a good idea to use regular examples so anyone in your house can control lights with your Chatterbox.

Putting it all together

Let's us know what spells and skills that you come up with!

On day 7 of our 30-day skill challenge, we'll be tracking the recovery from the COVID-19 pandemic using the latest numbers from Johns Hopkins University.

It's hard to avoid all the news surrounding the pandemic that we are currently in. So we thought that we'd use this as a learning opportunity with a positive spin. Today we are going to learn how use a new API that grabs data from Johns Hopkins University to track COVID-19 recoveries in your country.

Variables Review

Let's review Variables from yesterday. If you recall, a variable is an object that "remembers" or stores information. You can create them by going to the Variables menu and clicking 'Create variable'.

Make your own variables by clicking the 'Create variable' button

Once you create your own variable, you can set the value of the variable or you can use the variable in a Speak block.

The block on the left let's you SET the contents of the variable. The block on the right let's you USE the variable.

For this COVID-19 Recovery Tracker skill, we are going to need a variable to store the number of new recoveries per day.

You can name your block whatever you like, but we'll be using the Set block first

Hey Chatterbox, how many recoveries today?

Next, we need to decide how we would like to ask Chatterbox for recoveries. We'll be using the Listen block On phrases like this but need to think of all the ways that people might ask Chatterbox for this information.

We've come up with some examples, but your skill might look a little bit different.

Using the COVID-19 Block

The COVID-19 block uses an API that gathers information from Johns Hopkins University. Whoa?! What?! What's an API???

I'm glad you asked! An API stands for "Application Programming Interface" which is a fancy way of saying that it is a program that you can request information from.

To access the COVID-19 block, you first need to enable the Web APIs Extension from the extension page.

After enabling the Web APIs Extension, you can access the COVID-19 block

The COVID-19 block allows you to get a number for "New recoveries" by country. But just like yesterday, we need to store this number in a variable in order to be able to use it later.

This line will get the new recoveries from United States and store it in a variable

Your skill should now look similar to this.

Make Chatterbox answer the question

We now have set how to trigger the skill with the Listen block and have set the newRecoveries variable, it's time to make Chatterbox answer the question.

A double-sided text block lets you use variables to make Chatterbox speak

We'll do this using a Speak block and double-sided text block. If you recall you can find the text block in the "Data" category and it's handy when you want to use a variable block in a response.

We'll make Chatterbox answer the question by saying:
"Today there have been [newRecoveries] new recoveries from COVID-19 in the United States."

Your final skill should look similar to this:

On day 6 of our 30-day skill challenge, we'll be teaching Chatterbox how to help us play the Mad Libs game! We'll learn how to make Chatterbox ask questions and use the answer in a response.

So far we've made Chatterbox listen, speak and look up information from the internet. Now we're going to teach Chatterbox how to ask questions and put all together in a Mad Libs game.

Let's talk about Variables...

But first... Let's talk about Variables. You've actually already used variables in a previous skill. Remember the utterance_remainder block? That's a variable! A variable is an object that "remembers" or stores information.

The utterance remainder block is a type of variable.
Make your own variables by clicking the 'Create variable' button

The utterance remainder block is a block that we've made, but did you know that you can make your own variables by clicking the 'Create variable' button in the Variables menu. You'll see two different variable blocks. The block on the left let's you SET the contents of the variable. The block on the right let's you USE the variable.

The block on the left let's you SET the contents of the variable. The block on the right let's you USE the variable.

To Do: Create a variable named Answer

Hey Chatterbox, ask me a question!

Before we jump into making Chatterbox ask a question, let's stop and think about what actually happens when someone asks us a question.

When someone asks you your name:
1. You Listen to the question
2. They Ask a question
2. You Answer the question
3. They might respond with your name: Hi _________!

It's the same basic process to get Chatterbox to ask a question, except the block is called Get response for question. You can find this block in the Speak category because the block makes Chatterbox speak a question.

To try this out, let's build a simple question skill. In the Get Response for question, type: Would you rather eat snails or crickets?

Finally, we need to have Chatterbox respond using the spoken answer. Use a Speak block with a double sided speech block

Add the double connector text block to create a spoken sentence with a variable

Your final skill should look something like this:

What did we learn?
We learned that using the Get Response with a variable lets us save an answer that we can use in a response to the user.

Building a Mad Libs Game

Mad Libs is a silly word game where you ask someone a bunch of questions, then use their answers to fill in the blanks in a pre-written story. We're going to our own spin and build a Mad Libs game that you can share with friends and family inspired by one of their printables.

In this Skill Challenge, we are going to give you a written template that you'll turn into a Chatterbox voice skill.

Mad Libs Script

Intent trigger: play mad libs

Chatterbox speaks: Let's play mad libs! I'm going to ask you a bunch of questions and tell me the first thing that pops into mind.

Chatterbox asks questions and stores the answers: Words in brackets should be created variables.

What is your [name]?
Pick a [theme].
Pick a [place] or location.
Pick a [day] of the week.
Pick a [time] of day.
Pick a [verb].
Pick an [animal].
Name a [body] part.

Using the answers from above:
[Name] is formally invited to Chatterbox's [theme] party.
It's going to be at [place] on [day].
Please make sure to show up at [time] or else you will be required to [verb] a [animal] with your [body]
See you at the party!

Hints for the Skill Challenge:

Hint #1: Create all your variables first

Create your variables first

Hint #2: Ask all your questions second.

Use the Set block with the Get response to ask all your questions.

Hint #3: Once you've asked all your questions, make Chatterbox speak sentences using variables and text blocks.

Use your variables and the double-sided speech block.

Your final skill should look something like this:


On day 5 of our 30-day skill challenge, we'll be teaching Chatterbox how to play podcasts and sharing a short list of interesting resources for the entire family.

As we all have been spending more and more time indoors and in front of screens, we thought we'd come up with some screen-less entertainment options for the whole family. Did you know that there is an entire world of audio podcasts that are fun, educational and interesting for the entire family? Today we'll learn how to teach Chatterbox to play podcasts and share some of our favorite podcast resources.

What's a podcast?

Simply put, a podcast is audio show that you can subscribe and listen to over the internet, on phones and computers, and even your Chatterbox! You can find all sorts of podcasts for every imaginable topic that you can think of.

There is a mountain of podcasts, but how do we search and access them with Chatterbox? With the Podcast Extension of course!

Enable the Podcasts extension to get access to podcast skill blocks

Once enabled, you should have access to the Podcast blocks in the Skill Builder. The block that we'll be using for this skill is called Search podcasts by Title.

The Search podcasts block lets you search podcasts by their title, description or author

This block is very handy because it allows us to search for a podcast by name. When combined with a Play audio block, it enables Chatterbox to play a podcast when on demand.

In this example, we are going to use a fun podcast called Story Pirates by Gimlet media which a funny sketch comedy show based on stories written by kids.

By combining blocks, you can search for a podcast and play it in a single step
Story Pirates by Gimlet Media

Now add the block to a listening block so you can trigger the intent. Try to think of all the ways that you or someone else might ask for the podcast.

Last of all, don't forget to make Chatterbox respond to requests. It's very good practice to respond to the user request with a speak block. This lets them know that Chatterbox triggered the correct intent.

Your final code should look something like this...

Your final code should look something like this.

Podcast resources for the entire family

Podcasts are fantastic resources for the entire family. There are literally hundreds of podcasts on any given topic. We encourage you to search and explore podcasts to find ones that you love.

To use any podcast in your podcast skill, simply enter the podcast name in the green text block.

Enter the podcast name in the green text block

To help get you started, we've compiled a list of some of our favorite podcasts for the entire family:

Story Pirates
by Gimlet Media

Sketch comedy show written by kids and performed by adult actors.

But Why: A Podcast for Curious Kids
By Jane Lindholm, Vermont Public Radio

The show answers questions, both big and small, sent in from kids around the world.

Wow in the World
By NPR

Amazing (and silly) stories in science, technology and innovation to inspire tinkering at home.

The Music Box
By 89.3 WFPL News Louisville

Explore classical music concepts in a fun and interactive way. The Music Box integrate many learning standards from different grade levels.

Brains on!
By American Public Media

An award-winning audio show for kids and families that explores answers to fascinating questions about the world. The show inspires kids' natural curiosity and wonder.

If you have any podcasts that you especially love and would like to be added to this list, let us know! Email your favorite podcasts to [email protected]

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.

How do you ask for music?

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.

Make Chatterbox play audio

Before we can make Chatterbox play audio, we need to first enable the Audio extension from the Extension page.

Enable the Audio Extension to access the audio blocks

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.

The Play audio block will play songs from file path or from URL

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

Putting it all together

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!

On day 3 of our 30-day skill challenge, we'll be teaching Chatterbox how to understand all the ways people ask for weather, then look up the latest weather information from the internet.

Before we get started, let's think about how we say things. If you were to ask a friend about the weather, how would you say it? (Try to think of as many examples as possible)

"What's the weather today?"
"What's the weather?"
"What's the weather like?"
"How's the weather?"
"What's the weather like today?"
"Tell me about the weather?"

Using the When I hear block it might look like this...

While this might work, the repetition is bad design and can lead to problems

While this would work just fine, there would be a lot of duplicate blocks that could lead to issues after teaching your Chatterbox lots of skills. While there are multiple utterances, each utterance is asking the same question: What's the weather for my location? This leads us to the idea of Intent. Intent is what your utterance is asking Chatterbox to do, also known as intention.

To solve this problem, we're going to use a new block in the Listen category. This new block named On phrases like this, works similar to the When I hear block but with special powers. This block can listen for specific matches, but it can also listen for variations on phrases using a fancy term called machine learning.

Simplify multiple utterances with the same intent into a single block

Now that we understand intent (get the weather), there are other subtle questions that we need to ask. Where do we want to find the weather for? Do we want the weather right now or later? Each of these will require a different information that we will get from special weather blocks.

In order to get weather information we need to enable the 'Weather' extension by clicking the Extensions link then clicking the toggle for the Weather extension. Once enabled, you'll find a new category in your skill builder for Weather.

Weather blocks that we'll be using in this skill

Using these blocks will make Chatterbox speak a full sentence with whatever information is most relevant for the current weather, hourly forecast, weekly forecast or current weather in a location.


Skill Challenge: Make a weather skill that tells you the weather

Additional requirements:

--Speak the current weather
--Speak the daily forecast
--Speak the forecast for the week
--Speak the current weather for any city

© 2022 Gigundo, Inc. Public Benefit Corporation.