“Can I show my method?”
In my CadenceKey demo, five steady taps on a space bar bring that question to the screen. It's for the moment when a teacher has shown one way to solve a maths problem and a student wants the marker to show another.
CadenceKey gives a student who prefers to tap a way to join that conversation. They choose the words and the rhythm. The phrase appears in large type, and an available local voice can read it aloud.
Try these four taps
Press Space twice quickly, leave a longer gap, then press twice more. Pause to finish. The starter phrasebook recognizes “I have an idea.” Move the long gap to the beginning and the same four taps say “Give me a moment.”
To add the question from the demo, open Teach a phrase, enter “Can I show my method?” and play five evenly spaced taps three times. Save the phrase and play it a little faster. The words come back. The phrasebook also remembers it the next time you open the studio in that browser. Play CadenceKey.
How one key learns a vocabulary
The browser measures the gaps between taps. CadenceKey's classifier converts those gaps to a log scale and removes the overall tempo. That keeps the long pause in the same place even when someone plays the whole rhythm faster. Among phrases with the same tap count, the two closest examples of each phrase determine its score. The model asks for a fresh take when a rhythm is unfamiliar or two phrases are too close to call.
Rhythm matching runs on the device in JavaScript. The browser stores each personal phrase with its three training examples, and the student can remove it from the phrasebook.
Can the model tell four taps apart?
A seeded test generated 600 synthetic four-tap performances for the starter kit. Every sequence had the same tap count. The test varied tempo and swing and added up to ±19% random jitter to each gap. The model matched all 300 familiar rhythms to the correct phrase and requested a fresh take for all 300 unfamiliar rhythms. The code and results for both the moderate test and a higher-variation test are public. Reproduce the evaluation.
Built With
- css3
- html5
- javascript
- machine-learning
- web-speech-api