tgies/klattsch
primitive parallel-formant speech synth in the browser
What it solves
It provides a way to generate synthetic speech in the browser, Node.js, or via a CLI without needing heavy external dependencies. It specifically recreates the "retro" sound of late-70s and early-80s speech synthesizers (like Votrax or SAM) using parallel-formant synthesis.
How it works
The system uses a two-part process: a compiler and a synthesizer.
- The Compiler: Takes phoneme strings (using the ARPABET standard) and directives (for pitch, voice height, and timing) and converts them into a time-stamped schedule of targets.
- The Synthesizer: Interprets that schedule to produce sound. It uses a Rosenberg-style glottal pulse for voiced sounds and xorshift noise for unvoiced sounds, which are then passed through three parallel bandpass biquad filters (formants) to shape the vocal quality.
It supports polyphony, allowing multiple independent voices to be mixed together, and can be integrated into web apps via AudioWorklets for low-latency playback.
Who it’s for
- Web developers wanting to add retro speech effects to their projects.
- Game developers looking for a lightweight, dependency-free speech engine for characters.
- Sound designers interested in formant synthesis and early computer speech.
Highlights
- Zero runtime dependencies: Works across browser, Node, and CLI.
- Polyphonic support: Ability to create chords or multi-voice speech.
- Flexible prosody: Control over pitch, vibrato, breathiness, and glottal effort.
- Customizable: Decoupled compiler allows for custom engines or opaque state directives for advanced DSP extensions.
Related
- Project
- Project
- Project
- Project
- Project