Make it say something
Toward flow, phrases spoken together in one recording are reused whole. Toward fragments, words that exist whole are cut apart anyway, down to single sounds at the far end.
press “Say it”
- whole word
- phrase reuse
- syllable stitch
- phoneme fallback
- sounded out
- missing
How a word gets built
Mouthpiece tries the most natural option first and falls back one tier at a time. The colours match the machine above.
-
01
whole word
The exact word was spoken somewhere in the corpus. Use that clip directly. Most natural, when it's available.
-
02
phrase reuse
Consecutive words were spoken together in one recording. Reuse the whole span as one clip: real co-articulation, no seam.
-
03
syllable stitch
Look the word up in CMUdict, split it into syllables, and splice them from other words, keeping runs that were spoken together where they exist.
-
04
phoneme fallback
Fall all the way down to individual phones. Rougher, but it makes almost any word constructible. Whichever of 03 and 04 needs fewer splices wins.
Sounded out is this page's own addition: a word CMUdict can't place at all gets pieced together from dictionary fragments and letter sounds. The engine leaves a gap instead.
What this page carries
The engine works on a full local index. This page carries a slice of it, cut by tools/export_bank.py and loaded in pieces as your text needs them.
full index
- 165,425words indexed
- 195,011syllables
- 491,964phones
on this page
- 3,000common words
- 650phrases
- 3,510syllable shapes
- 39phones
Every fragment is attributable
Each render writes a .manifest.json next to the WAV: which recording every word came from, who said it, when, and where in the file. Missing words become 400 ms gaps listed as found: false. The machine above gives you the same kind of manifest.
the recordings
All recordings are public domain, from archive.org and the Obama White House archive. LibriVox entries name the book's author; the reader is a LibriVox volunteer.
Run it on your own corpus
Python 3.11, WhisperX for transcription and word alignment, SQLite for the index. A GPU is strongly recommended for transcription.
-
Install
python3.11 -m venv .venv && source .venv/bin/activate pip install torch torchaudio # CUDA build recommended pip install -e . -
Ingest a recording
mouthpiece ingest corpus/myspeech.wav --metadata corpus/myspeech.jsonNormalizes to 16 kHz mono, transcribes, aligns word timestamps, writes the index. Metadata (speaker, date, event, source URL, license) is optional.
-
Check coverage, then render
mouthpiece coverage "we must act now" mouthpiece "we must act now" -o renders/out.wavWrites a WAV that drops straight into Reaper, plus its manifest.
Full README: commands, environment variables, speaker diarization →