AI and ML for kids – part 2 | We're building a voice assistant like Siri or Alexa

Micke Kring Micke Kring · · 2 min read
Läs på svenska
AI and ML for kids – part 2 | We're building a voice assistant like Siri or Alexa

In this short series I thought I’d give you, as a primary school teacher, some lesson ideas around hands-on teaching in AI – and in this case the subfield ML, Machine Learning or maskininlärning in Swedish. Most children and adults already use services built on ML today, such as Siri, Alexa, or Google Assistant. Or, as in this case, various filters in social media. We do this within the subjects of technology and mathematics.

In this part 2, we code a voice assistant together, similar to Alexa or Siri. When we say “Hi Datamicke”, our assistant asks what it can do for us. In this case the assistant should be able to answer what time it is, but of course you can expand this and make it as big as you want.

Video

Scratch

In this example I’m using a version of Scratch from Machine Learning for Kids which you can find at scratch.machinelearningforkids.co.uk. It’s the same version as the link before, but this one includes some extra extensions specifically for machine learning, like “Face detection”. If you haven’t worked with Scratch before, I recommend you learn it now. It’s free and open source from MIT. You can find it at scratch.mit.edu

Download my example

If you want something to start from, you can download my example from the video and play with it. Download the Scratch file HejSiri.sb3

Summary of the code

We let the program wait for a start phrase and when it hears it, the rest of the code starts. The program asks what it can help us with, listens and when it hears the word “klockan”, it tells the time.

Questions?

If you have any questions, as usual just ask :)