I wanted a microphone project with a very small brief: hear a sound, copy it, and see how close you got.
That became Mimic Party Online, a browser game where each round gives you a short sound cue and one recording attempt. The cue might be a meme clip, an animal call, a machine noise, or something that is hard to describe without making the sound yourself.
It looks like a toy, and it is. It also turned into a useful little audio problem. A score based only on volume would be boring, so the game needs to compare the shape of two sounds while staying fast enough to run in a browser.
The round is intentionally simple
The player does five things:
- Choose a sound pack.
- Listen to the reference.
- Record one take.
- Listen to the take.
- Read the score.
The replay is important. People tend to remember the sound they meant to make. The recording tells them what actually came out. A convincing robot alarm can turn into a tired bicycle horn pretty quickly.
Quick mode runs for four rounds. Survival mode gives the player three Mic lives and keeps the run going until those lives are gone. The game also has different routes, so a player can protect a streak or accept a shorter recording window for more points.
The browser does the audio work
The recording stays in the browser. The game uses the microphone stream, converts the take to mono PCM at 16 kHz, and extracts the values needed for scoring. The audio does not travel to a scoring server.
For each take, the extractor looks at signals such as:
- pitch contour
- timing and active duration
- attack and energy
- rhythm and onset positions
- spectral shape
The game does not use every signal for every sound. A pitched cue cares more about contour, while a machine noise depends more on its shape and attack. A rhythmic sound needs the hits to arrive at roughly the right moments.
This is also why the score is more useful when it has labels. A result of 68 is not very instructive by itself. "Timing: 74" gives you something to work on in the next attempt.
Comparing two imperfect recordings
The scorer turns the extracted values into feature distances. Duration and energy can use a straightforward difference after normalizing the arrays. Pitch contour is less cooperative because two people rarely make the same sound at exactly the same speed.
For that comparison, the game uses dynamic time warping with a 14 percent Sakoe-Chiba band. That lets a slightly slower or faster imitation line up with the reference, but stops the match from wandering anywhere it wants.
Each sound profile then applies its own weights. The final score is scaled to 0 through 100, and the interface shows the dimensions that mattered for that particular cue.
There is a quality check before scoring. Very short, quiet, clipped, or noisy takes are not treated as bad imitations. They are treated as bad input, and the game explains what to change. Move closer if the microphone barely hears you. Move back if the signal clips.
Why I kept it local
Microphone access is already a moment where a player has to trust the page. I did not want a silly voice recording to become an unexplained upload.
Local processing has another benefit: the result appears right after the recording ends. There is no upload progress bar and no request waiting on a remote model. The session state is saved in the browser as well, so a player can leave and return to an unfinished run on the same device.
The tradeoff is that browser audio is not perfectly predictable. Microphone hardware varies, background noise varies, and some browsers expose different audio capabilities. The game has to handle those cases instead of assuming every take is clean.
The part that took longer than expected
The comparison code was only half the job. The harder part was making the score feel fair.
A low score should tell the player why the attempt missed. A replay should make the result understandable. The interface should leave room for a bad take to be funny instead of making it feel like a failed test.
That is the reason the game shows the voice shape, the individual dimensions, and the recording before the final verdict. If the number is disappointing, there is still a clear next move: change the rhythm, hold the sound longer, or make a completely different noise and see what happens.
If you have a microphone handy, pick a pack and try one round. You may produce the robot you intended. You may produce the bicycle horn. Both recordings count.

Top comments (0)