WEEK6

Written by:

Voice Vault

This week’s prompt was to watch Daniel Shiffman’s ml5.js sound classification tutorial and build an interactive browser experiment around sound data, in p5.js. The model in the video recognizes a small set of spoken words. Instead of leaving it as a plain recognizer, I turned it into a game: Voice Vault, a safe you crack by speaking a secret code.

What it does

A row of locked slots shows how many digits the code has. You speak the code one digit at a time — “one, two, three, four, five, six.” Each correct digit clicks into place and the confirmation tone rises in pitch. A wrong digit buzzes and sends you back to the start. Crack the whole code and the vault sets off a burst of confetti and a chord. You can also type your own code and then try to break it by voice. [demo link / GIF]

How it works

p5 and ml5 do the heavy lifting. In preload() I load ml5’s pre-trained SpeechCommands18w model, which recognizes the spoken English digits zero through nine. In setup() I start it listening; it hands me a label and confidence in a callback. Everything else is state I drive in p5’s draw() loop.

https://editor.p5js.org/ervin021013/sketches/4xVpykIWY

Leave a Reply

Latest Articles

Previous: