Tutorial: Skill ‘Basics’

This is the lede paragraph for the blog post. It should be populated with dynamic data from a WYSIWYG custom field assigned to your posts.

Written by

Kevin Elgan

Published on


Challenge: How do we teach Chatterbox how to ‘Listen’ and ‘Speak’?

Chatterbox is a smart speaker that can listen and speak based on simple instructions. Each set of instructions is called a “Skill” or something that Chatterbox can do. Skills are basic programs that you code using visual blocks.

Chatterbox only listens when you push the big yellow button on its head. But it only listens for the things that you teach it.

How to Make Chatterbox Listen

The ‘When I hear’ block makes Chatterbox listen for a specific word or phrase.

To make Chatterbox listen for a specific word or phrase, you use the ‘When I hear’ block. In the example pictured above, Chatterbox will listen for “hello.” Once it hears “hello,” it will trigger anything contained inside the block.

Important: The ‘When I hear’ block is the starting point for all skills. Unless Chatterbox, hears the key word or phrase, it won’t do anything except say the default message “I don’t know how to do that, but you can teach me.”


How to Make Chatterbox Speak

The ‘Speak’ block makes Chatterbox say words or phrases that it contains.

The ‘Speak’ block is how you make Chatterbox speak a word or phrase. But the block will only work when combined with the ‘When I hear’ block.

Stacking speak blocks will make them speak in order.

You can also stack multiple ‘Speak’ blocks in a row to have them speak in order.

The ‘Speak Random’ block will make Chatterbox pick a random phrase.

You can change things up with a bit of randomness by using the ‘Speak Random’ block. When using this block, Chatterbox will choose at random only a single phrase from the block.

The example above will only speak “Heads” or “Tails” but not both.

Take the Matrix Challenge

If you’ve seen the Matrix movie, Morpheus asks Neo which pill he would like to take to discover what the matrix is. Let’s make a skill to help Neo decide which pill to take.

Place the ‘Speak Random’ block inside the ‘When I hear’ block as pictured below.

Before you can test it out, you need to save your work by pressing the DEPLOY button on the top right.

Result: After pushing the button and asking the question, Chatterbox should respond with either “Red pill” or “Blue pill.”

Skill Ideas

You can combine these three blocks to make all sorts of skills. Below are a couple ideas to get you started:

Tell me a joke

Create your own joke skill using multiple speak blocks

Flip a coin

Create a skill to randomly pick different options for you

Ask the crystal ball

Related Posts