Skip to content
shiva.wm
--:--

ghostwriter

phonetic rhyme and flow analysis, built from the IPA up

activecomputational linguistics2026 — present

A local-first songwriting workbench whose core is a hand-built phonetics engine that scores rhyme and flow on articulatory features rather than string matching or an off-the-shelf rhyme library. Every line runs through a three-tier grapheme-to-phoneme pipeline — a user custom dictionary, the CMU ARPABET dictionary for English, and an espeak-ng subprocess for German and out-of-vocabulary words — yielding IPA, per-syllable stress, and a stress-anchored rhyme tail persisted to a normalized 12-table SQLite schema.

On top sit independent scorers that compare lines by vowel height/backness/rounding and consonant manner/place/voicing, with diphthong decomposition, a cross-language vowel-bending table grounded in rap phonology, multisyllabic-rhyme detection with positional decay, and a flow matcher built on a weighted stress edit distance plus meter classification (iambic, trochaic, anapestic, dactylic, spondaic). A single strictness slider continuously reweights the scoring components and slides the match threshold from strict perfect rhymes to loose slant matches, and the whole engine is fully bilingual across G2P, syllabification and external suggestion routing (Datamuse for English, RhymeBrain for German).

Roughly 14,000 lines of TypeScript on Next.js 16 and React 19, with a ~2,200-line, 19-module phonetics core backed by ten Vitest suites, feeding 33 API routes and 18 pages spanning rhyme schemes, couplet finding, beat-to-syllable mapping and palette generation.

stack
TypeScriptNext.js 16React 19better-sqlite3espeak-ngCMU Pronouncing DictionaryIPA / ARPABETDatamuse APIRhymeBrain APITailwind v4shadcn/uiVitest