Full code snippet: rendering WAV with Kale TTS in ~20 lines of transformers.js

NERDDISCO · x · 2026-11-20

Kale TTS runs in browser and Node via transformers.js, and NERDDISCO shares a complete snippet: load StyleTextToSpeech2Model, prepare sentence-by-sentence inputs, build Tensors, get a Float32 waveform at 24 kHz, and write hello.wav — identical for tiny and nano. He also nudges maintainers to merge PR #1879, the onnxruntime 1.31.1 bump (which fixes Gemma 4 QMoE and sliding-window attention on WebGPU per #1839), worth 20% faster CPU inference.

Original post →

More from coding & agent

coding & agent channel →