Whistle: a 16.9 MB Speech-to-Text Model for Phones and Tiny Devices
Cactus Whistle is a single-file, CPU-only speech recognizer with word timestamps, keyword biasing and speech embeddings. Install it and transcribe a clip.
The code in this post comes from the model's docs and hasn't been run in our CI yet. If something breaks, let us know.
Whistle is a speech-to-text model from Cactus Compute, aimed at mobiles, wearables, robots, smart-home devices, cars and microcontrollers. The notable part is the size: the whole model is a single 16.9 MB file. It runs on the same CPU engine as the team’s Needle model, with no dependencies and no GPU.
Key specs
| File | whistle.cact, 16.9 MB |
| Input | 16 kHz mono audio, up to 30 seconds in one pass |
| Languages | English, German, French, Spanish, Italian, Dutch, Polish |
| Language handling | Detected unless you name it |
| Silence | Returns an empty transcript rather than an invented sentence |
| Runtime | Needle’s CPU engine, no GPU |
| Precision | 2 to 4 bit (per the card’s benchmark notes) |
| License | Apache 2.0 |
The model does three jobs on the device:
- Transcription of audio into text.
- Word timestamps: each word with its start, end and probability, aligned from the decoder’s own attention.
- Speech embedding: the encoder output, one row per 80 ms frame, for matching and retrieval without decoding a transcript.
Whistle also supports keyword biasing, which favours names, places and product words your users actually say during decoding.
How it’s built
The card describes a log-mel front end and a convolutional stem feeding an audio encoder. A Needle-shaped decoder reads the encoder through gated cross attention at every layer. It reuses Needle’s .cact container, quantization, SIMD kernels and KV cache, so a device that already runs Needle runs Whistle in the same binary.
The decoder is “laddered”: every depth from 2 layers up is a deployable model, chosen at load time with --audio-depth. The Hugging Face repo holds whistle.cact. The engine and its platform folders are in Cactus-Compute/needle3.
Install
pip install cactus-needleA 16 kHz WAV or raw samples need nothing beyond the base install. Other sample rates and microphone capture need the [mic] extra. The Python package and source are on GitHub.
Run it
import needle
print(needle.transcribe("clip.wav")["text"])# turn off the kitchen lightsEvery call returns the text, the language, the milliseconds to the first token, and the decoder’s tokens per second after that. The engine and the weights are fetched once and cached.
Word timestamps, keywords and a forced language
The card names three options on the same call: word_timestamps=True adds each word with its start, end and probability, keywords=[...] favours the names your users say, and language="de" forces the language instead of detecting it.
import needle
result = needle.transcribe( "clip.wav", word_timestamps=True, keywords=["Cactus", "Needle"], language="de",)print(result["text"])The card does not show the shape of the word-timestamp output, so inspect result before building on it. The keyword list is only an illustration; use your own names and product words.
Speech embeddings
needle.Whistle() is the same model as an object. The card says to use it for embed(audio), or to hold one tuned .cact. The encoder output is one row per 80 ms frame, for matching and retrieval without decoding a transcript.
The card gives no example call for embed, so this post doesn’t show one. Check the package source on GitHub for the argument it takes.
Command line and the C engine
The card shows these commands:
needle whistle playgroundneedle whistle compareneedle whistle playground transcribes from the microphone, and needle whistle compare puts Whistle next to Whisper and Moonshine on the same clip.
To use the engine directly, the card shows downloading a platform folder and the model, then running a clip:
needle download macos-arm64needle download whistle./macos-arm64/needle --model whistle.cact --audio clip.wav --audio-word-timestampsEach platform folder holds a needle binary, libneedle.a and needle.h. The speech C API is needle_load, needle_transcribe and needle_embed, and needle_complete takes a clip directly and does the transcription for you. The engine reads no environment variables, so every run of the same blob scores the same.
Pairing it with Needle
One engine runs both models. With both .cact files loaded, it transcribes the clip, answers the transcript against your tools, and returns one JSON object with the tool calls and the speech fields. The speech fields are prefixed audio_.
needle --model whistle.cact --audio clip.wav
needle --model needle3.cact --model whistle.cact --tools tools.json --audio clip.wavThe second command is “audio in, tool calls out” in one call. The card does not describe the format of tools.json on this page, so see the Needle repository for that.
Gotchas
- 30 seconds per pass. Longer audio needs to be cut up by you. The card does not describe a built-in chunking mode.
- Sample rate. Anything other than 16 kHz needs the
[mic]extra. - Seven languages. The card lists English, German, French, Spanish, Italian, Dutch and Polish. Nothing else is claimed.
- Benchmarks are in images. The card’s word-error-rate and speed comparisons with Whisper and Moonshine are charts, with notes about methods (Apple M4 Pro for speed, the Whisper normalizers for WER). The numbers are not in the card’s text, so this post doesn’t repeat them. Look at the charts, and test on your own audio.
- Not run here. This post comes from the model card, and the code has not been executed.
When to pick it
Pick Whistle when the constraint is the device: a tiny footprint, CPU only, no network, and a runtime you may already ship if you use Needle. Word timestamps and keyword biasing are useful for apps that highlight or seek by word, or that must get product names right.
Look elsewhere if you need languages outside the seven listed, or audio streams that run well past 30 seconds without you chunking them yourself. If you want a particular accuracy level, check the card’s charts against your own recordings first.
Related
Run MNN-Pocket-0.3B: A 300M Model Built for Phones and Tablets
MNN-Pocket-0.3B is a 300M-parameter bilingual chat model with a 173 MB INT4 build. Here is how to run it, what the card says it can do, and where it falls short.
taobao-mnn/MNN-Pocket-0.3B
Clean Noisy Speech with Inworld Voice Isolator, Offline or Live
Inworld's Apache-2.0 voice isolator removes noise, music and background voices from 48 kHz speech, with an offline model and a realtime streaming one.
inworld/voice-isolator
Aion 1.0 Instruct 2.3B: Microsoft's Small Model for Summaries and Rewrites
Run Microsoft's MIT-licensed 2.3B Aion 1.0 Instruct with transformers for summarizing, rewriting, chat and tool calls, with a 32K-token context.
microsoft/Aion-1.0-Instruct-2.3B