Show HN: Misheard turns "recognize speech" into "wreck a nice beach"

2 pointsposted 6 hours ago
by rickintoplace

3 Comments

rickintoplace

6 hours ago

I initially built this as a toy and it turned into an interesting small phonetics project.

Enter a sentence and it finds other ways to break down the same sounds into English words: “kiss the sky” gives you “kiss this guy”. “Four candles” turns to “fork handles”. “Ice bank mice elf” ... I think you get the idea

Each word is looked up in the CMU Pronouncing Dictionary. The sentence is converted into a sequence of phonemes, and a beam search breaks it back down into words. Exact re-parsing is rare, so sounds may be distorted under certain conditions. For example, keep in mind that a double consonant at a word boundary sounds like a single one (mistake/miss steak). A /ɡ/ before a nasal almost completely disappears (recognize -> “reco'nize”). The sound alone is not enough to distinguish “wreck a nice beach” from “reckon eyes beach,” so variations that actually appear in 40 million lines of movie subtitles are also taken into account.

The system was calibrated using 42 known oronyms (38 in the top 12, 25 in first place), and I disabled each rule individually to see how much it contributed.

What doesn’t work: long sentences, proper nouns (“Euthanasia” -> “Youth in Asia” is impossible, since names are filtered out), and it only works with American English, since CMUdict only contains that.

Static site, no server, no LLM. Code: https://github.com/rickintoplace/wordlab

4d4m

3 hours ago

Neat, and weirdly useful for refining lyrics in the same way I'd use a rhyming dictionary on occasion.

rickintoplace

3 hours ago

Thanks :) I'm also building a tool for spoonerisms that might be useful for rhyming: https://wordlab.rickinto.place/spoonerize

It uses the same data as the misheard tool and produces cross-pairs like these: Be known Knee bone

No guts Go nuts

And there is a rude word filter for SFW that can also be inverted for extra "edginess"