Pocket-sized speech, in Go

Kyutai’s PocketTTS is a text-to-speech model small enough to run on a CPU. Its reference implementation is Python and PyTorch. go-pocket-tts runs the same model as a single Go binary: it reads the safetensors weights directly and needs neither Python nor ONNX Runtime.

It got one sentence in Audio on Linux, in Go. It deserves more than that, because upstream has moved on since then: a September model, German, a 24-layer variant and a new kind of sampler. This weekend I brought the port up to upstream v3.3.0. That came to 25 pull requests and 116 commits in two days, and German is part of it.

Continue reading “Pocket-sized speech, in Go”

go-sofa and go-hdf5: how a head hears, in pure Go

A SOFA file describes how a head hears. SOFA (Spatially Oriented Format for Acoustics, standardised as AES69) stores head-related transfer functions: for hundreds or thousands of directions, the impulse response from a loudspeaker at that direction to a microphone in each ear. With such a set you can place any sound anywhere around a listener on headphones. I wrote my first SOFA reader, PasSofa, in Object Pascal in 2017, and ported it to JavaScript as WebSofa. Now there is go-sofa, which reads and writes SOFA files in pure Go, on top of my fork of a pure-Go HDF5 library, go-hdf5. Both started in February. On the last weekend of September they got about 230 commits and 39,000 added lines. Every figure in this post was made by a Go program that reads the files with go-sofa or go-hdf5.

Continue reading “go-sofa and go-hdf5: how a head hears, in pure Go”

SynthEdit modules and tools

Here is a confession right away: I have never actually used SynthEdit to make music. But I was fascinated by how it worked — a modular environment where third-party modules (SEMs) plug into a visual synthesis graph. So I did what I always do with fascinating architectures: I took it apart and built for it. The results live under SE modules and SE Tools.

Continue reading “SynthEdit modules and tools”