a concatenative speech-collage engine

MOUTHPIECE

Type anything. Hear it built from real clips of real people actually saying it: whole words where they exist, syllables and single sounds cut out of other words where they don't. Every fragment says where it came from.

Not TTS.

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
    01

    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.

    1. 01

      whole word

      The exact word was spoken somewhere in the corpus. Use that clip directly. Most natural, when it's available.

    2. 02

      phrase reuse

      Consecutive words were spoken together in one recording. Reuse the whole span as one clip: real co-articulation, no seam.

    3. 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.

    4. 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.

    02

    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
    03

    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.

    04

    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.

    1. Install

      python3.11 -m venv .venv && source .venv/bin/activate
      pip install torch torchaudio   # CUDA build recommended
      pip install -e .
    2. Ingest a recording

      mouthpiece ingest corpus/myspeech.wav --metadata corpus/myspeech.json

      Normalizes to 16 kHz mono, transcribes, aligns word timestamps, writes the index. Metadata (speaker, date, event, source URL, license) is optional.

    3. Check coverage, then render

      mouthpiece coverage "we must act now"
      mouthpiece "we must act now" -o renders/out.wav

      Writes a WAV that drops straight into Reaper, plus its manifest.

    Full README: commands, environment variables, speaker diarization →