[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-47":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":25,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":16,"starSnapshotCount":16,"syncStatus":14,"lastSyncTime":30,"discoverSource":31},47,"klattsch","tgies\u002Fklattsch","tgies","primitive parallel-formant speech synth in the browser","https:\u002F\u002Ftgies.github.io\u002Fklattsch\u002F",null,"JavaScript",348,22,2,78,0,4,6,41,12,4.09,"MIT License",false,"main",true,[],"2026-06-12 02:00:07","# klattsch\n\nA primitive parallel-formant speech synthesizer in the browser. Late-70s \u002F early-80s tier (Votrax, SAM).\n\nThe name is a portmanteau of *Klatt* (Dennis Klatt, the formant-synth pioneer) and *Klatsch* (German for gossip \u002F casual chat).\n\n[**Live demo**](https:\u002F\u002Ftgies.github.io\u002Fklattsch\u002F)\n\n[**Commercial support**](#commercial-support) - integration consulting from the author\n\n## What it does\n\nYou type a phoneme string in [ARPABET](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FARPABET), with optional directives, and the computer says it.\n\n```\nHH AH L OW                        hello, default voice\nb140 HH AH L OW                   higher voice\nbA3 HH AH L OW                    higher voice (note name)\nAY+15 D IH D                      \"I did\" with a rising contour\nD IH D DH AE(+40) T               \"did THAT\" with a transient pitch ornament on AE\nr200 bC#4 ( HH AH ) ( L OW )      sung syllables, one note per group\n```\n\nSee the in-app `syntax help` panel for the full directive table.\n\n## Installation\n\n```bash\nnpm install klattsch\n```\n\nThe same package works as a CLI, as an importable engine in Node, and as an embeddable engine + AudioWorklet in the browser. Zero runtime dependencies.\n\n## Usage\n\n### CLI\n\nRender a phoneme string straight to a WAV file:\n\n```bash\nnpx klattsch \"HH AH L OW\" hello.wav\n```\n\n### Node \u002F `OfflineAudioContext`\n\n```js\nimport { compileString, FormantSynth, encodeWav } from 'klattsch';\n\nconst sampleRate = 48000;\nconst { schedule, totalMs } = compileString('HH AH L OW');\nconst synth = new FormantSynth({ sampleRate, schedule });\nconst buf = new Float32Array(Math.ceil(totalMs * sampleRate \u002F 1000));\nsynth.process(buf);\n\nconst { bytes } = encodeWav(buf, sampleRate);\n\u002F\u002F write bytes to a .wav file\n```\n\n### Browser with a bundler (Vite, webpack, esbuild, Rollup)\n\n```js\nimport { compileString } from 'klattsch';\nimport workletUrl from 'klattsch\u002Fformant-worklet.js?url';\n\nconst ctx = new AudioContext();\nawait ctx.audioWorklet.addModule(workletUrl);\nconst node = new AudioWorkletNode(ctx, 'formant-processor');\nnode.connect(ctx.destination);\n\nconst { schedule } = compileString('HH AH L OW');\nnode.port.postMessage({ type: 'schedule', schedule });\n```\n\n### Browser without a bundler (CDN)\n\n```html\n\u003Cscript type=\"module\">\n  import { compileString } from 'https:\u002F\u002Fesm.sh\u002Fklattsch';\n\n  const ctx = new AudioContext();\n  await ctx.audioWorklet.addModule('https:\u002F\u002Fesm.sh\u002Fklattsch\u002Fformant-worklet.js');\n  const node = new AudioWorkletNode(ctx, 'formant-processor');\n  node.connect(ctx.destination);\n\n  const { schedule } = compileString('HH AH L OW');\n  node.port.postMessage({ type: 'schedule', schedule });\n\u003C\u002Fscript>\n```\n\n## How it works\n\n- **Excitation:** voiced source is a Rosenberg-style glottal pulse with a tunable open \u002F closed quotient (`g` \u002F \"effort\") and unvoiced source is xorshift noise. These are crossfaded by each phoneme's `voicing` parameter, with optional aspiration noise mixed in.\n- **Filtering:** three parallel bandpass biquads for each formant.\n- **Prosody:** the sequencer compiles phoneme strings into a time-stamped schedule of formant targets.\n- **Voice character:** vibrato (depth + rate), aspiration \u002F breathiness, spectral tilt, and glottal effort are all controllable.\n\n## References\n\n- Klatt, D. H. (1980). *Software for a cascade\u002Fparallel formant synthesizer.*\n- Hillenbrand et al. (1995). *Acoustic characteristics of American English vowels.*\n- Rosenberg, A. E. (1971). *Effect of glottal pulse shape on the quality of natural vowels.*\n- Robinson, R. Bristow-Johnson. *Audio EQ Cookbook.*\n\n## See also\n\n- [**libadlmidi-js**](https:\u002F\u002Fgithub.com\u002Flibadlmidi-js\u002Flibadlmidi-js) - WebAssembly build of libADLMIDI, an OPL3 FM synthesis library with AudioWorklet integration. Where klattsch does parallel-formant *vocal-tract* synthesis, libadlmidi-js does FM-operator synthesis: the sound of early-80s arcade boards and AdLib cards. Includes [oplsfxr](https:\u002F\u002Flibadlmidi-js.github.io\u002Fexamples\u002Foplsfxr.html), a sfxr-style sound effect generator.\n\n## Built with klattsch\n\n- [**klattsch-sing**](https:\u002F\u002Fsing.wasthatzero.net\u002F) - a piano-roll sequencer for speech-based singing synthesis. Draw notes, type words or phonemes, render to WAV. Supports MIDI import, quantization, tempo + time signature, demo songs, and a custom KSP project file format. Built on the klattsch npm package.\n\n## Commercial Support\n\n`klattsch` is built and maintained by [Tony Gies](https:\u002F\u002Fgithub.com\u002Ftgies). For studios, indie developers, and agencies integrating klattsch into a shipped product, consulting is available through his consultancy, Crash United, LLC.\n\n### Support Offerings\n\n| Service | Description |\n|---------|-------------|\n| **Game \u002F app integration** | Wiring klattsch into your engine (Unity, Godot, web, Electron, Flutter), with dialog-system glue and tooling for non-programmer collaborators (writers, sound designers) |\n| **Custom character voices** | Crafting a recognizable voice signature for a specific character: formant tuning, prosody templates, phoneme calibration, voice tests against scripted dialogue |\n| **Audio pipeline work** | Routing klattsch through your DSP graph: mixing with music, ducking, environmental effects (reverb, distortion, radio filtering), multi-voice ensembles, dynamic vocal sizing |\n| **Language \u002F phoneme expansion** | Non-English phoneme tables, alternate transcription formats, custom symbol sets for stylized worlds (alien races, fantasy languages, in-universe scripts) |\n| **Performance tuning** | Real-time constraints (game audio thread, low-latency targets), WASM\u002FRust ports, embedded or constrained-runtime targets |\n| **Custom DSP features** | Cascade synthesis, additional formants, LPC pre-filtering, vocoder modes, custom synth extensions beyond the included parallel-resonator engine |\n| **Priority bug fixes** | Reported issues triaged and patched ahead of the public queue, with backports to your pinned version |\n| **Workshops \u002F talks** | Formant synthesis, retro speech tech, or DSP fundamentals for your team |\n\nFor pricing, scoping, or anything not listed above, email **[support@crashunited.com](mailto:support@crashunited.com)** to discuss your project.\n\n### Sponsorship\n\nTo support ongoing development without a formal contract, [GitHub Sponsors](https:\u002F\u002Fgithub.com\u002Fsponsors\u002Ftgies) or [Ko-fi](https:\u002F\u002Fko-fi.com\u002Fcrashunited) are the simplest paths.\n\n## License\n\nMIT &copy; Tony Gies\n","klattsch 是一个基于浏览器的原始并行共振峰语音合成器，能够模仿70年代末至80年代初的语音合成技术（如Votrax, SAM）。其核心功能包括通过输入ARPABET音素串和可选指令来生成语音，支持多种调制方式如改变音高、添加音调装饰等。技术上，klattsch使用了Rosenberg风格的声门脉冲作为有声源，并采用三个并行带通滤波器处理每个共振峰，同时无声音源则基于xorshift噪声。该工具适合需要复古风格语音合成的应用场景，比如游戏开发、教育软件或艺术项目中。此外，klattsch还提供了命令行接口、Node.js模块以及浏览器环境下的AudioWorklet支持，便于开发者集成到不同平台。","2026-06-11 02:30:36","CREATED_QUERY"]