The kids and I play a typing game. I'll be sitting on the couch with my laptop, and one of them will come over and ask to play. We'll load up jefftk.com/speak:

I'll write something:

Then they'll write something:

Then I'll write something:

It only accepts letters, numbers, and a few punctuation marks. As you type it says the letters, and when you press enter it says your whole sentence. There's a history, but once something scrolls off the bottom of the screen it's gone.

Some ways we'll play with it:

  • They'll ask me how to write something, I'll spell it. I'll point out the letters as needed, as vaguely as I can.
  • I'll write something, they'll guess at it, then we press enter and find out if they're right.
  • I'll write something, they'll copy it.
  • I'll write a word like 'SAD' and then they'll see if they can modify it to make a related word like 'MAD'.

It uses upper-case and sans-serif because that's what the letters on they keyboard look like.

I got the idea from Daniel's version, but rewrote it from scratch to better ignore mistaken inputs. Feel free to copy and modify!

New Comment
3 comments, sorted by Click to highlight new comments since:

Thanks, my 5yo was able to entertain himself with that for an hour straight while I filed taxes :-)

I'll bring it out again later.

I like the legible javascript, feels like a throwback to the days of a simpler internet. :-)

Thanks! I'm glad they enjoyed it!

Writing things in Vanilla JS is a bit of a hobby of mine. Working all day in industrial-strength JS infrastructure with minification, source maps, compilation, and transpilation, it's really nice to just sit down and write something with nothing between me and the browser.

Yup! I have this little ditty that I made many years ago, when I was still learning javascript. I still use it. Then a few years after that I briefly decided that my True Calling was making a JS educational video game about circuit theory, and I got pretty far before deciding to give up and switch to other projects. :)