Whistle: Speech to Text in 16.9 MB

    Whistle: Speech to Text in 16.9 MB

    Whistle is a compact speech‑to‑text engine that packs a full‑featured recognizer into a 16.9 MB binary. It sidesteps the usual cloud‑dependency by running entirely on‑device, which means you can transcribe audio offline without sacrificing too much accuracy. The library ships with a lightweight acoustic model and a pruned language model, both trained on a diverse corpus to handle everyday conversation and common programming jargon.

    Installation is a single `npm i whistle-stt` (or the equivalent pip package) and the API exposes just two calls: `init()` to load the models into memory and `transcribe(buffer)` to get a string back. Because the model fits comfortably in RAM, start‑up times are measured in milliseconds, making it suitable for real‑time transcription in editors, IDE plugins, or voice‑controlled tooling.

    Performance scales with the host CPU: on a modern laptop you’ll see roughly 150 ms of latency per second of audio, while a modest Raspberry Pi still manages under 500 ms per second. The authors provide optional quantization steps that shave another 30 % off the memory footprint at the cost of a small drop in word‑error rate, which can be useful for embedded devices.

    If you’re building a coding assistant, note that Whistle’s language model can be fine‑tuned with a custom vocabulary file. Adding common API names, library functions, or domain‑specific terms dramatically improves recognition of code‑related speech. The project is open source, so you can dive into the model pipeline, swap out the decoder, or contribute optimizations back to the community.

    Source: Whistle: Speech to Text in 16.9 MB

    Technology
    Coding
    0

    More on this topic