DEV Community

Cover image for Fun Flashcards Game for Kids using AI Speech Recognition
Daniel Chifamba
Daniel Chifamba

Posted on

Fun Flashcards Game for Kids using AI Speech Recognition

This is a submission for the AssemblyAI Challenge : Really Rad Real-Time.

What I Built

I made a fun math game for kids with math flashcards. Kids answer by speaking, and the game uses AI Powered Speech Recognition to check their answers.

It has three levels of difficulty and a setting to turn sound effects on or off.

Demo

Live: https://mathwave.vercel.app

screenshot 1 screenshot 2 screenshot 3
Image description Image description Image description

Journey

I had fun hacking this one out. Initially setup most of the game using the native browser Speech Recognition API. That was an eye opener as I noted:

  • The recognition was rather poor. I assumed it was my voice so I had other people try it out. They too, seemed to end up frustrated as it was failing to recognize the right answer.
  • A lot of code and handling of edge cases was required
  • Results are not consistent across browsers. (ahem...Safari ๐Ÿ˜…)

Then came AssemblyAI to the rescue ๐Ÿ›Ÿ ๐ŸŒŠ
The (HUGE) difference:

  • Very easy to setup, very few lines of code
  • Consistent experience across browser
  • Awesome speech recognition from kid's voices to adult voices, even where it was a bit noisy ๐Ÿ”ฅ

Oh...and the Docs and Cookbook were on point ๐Ÿ™‚ I found a perfect example pretty close to what I wanted to do here

I simply followed this example to come up with the code that transcribes the answers by voice

The rest of the Source Code can be found here:

Price categories

  • Really Rad Real-Time

Top comments (2)

Collapse
 
mtwn105 profile image
Amit Wani

It looks cool

Collapse
 
dchif profile image
Daniel Chifamba

Thank you @mtwn105 ๐Ÿ™‚