基础设施 4.0 · 优秀 2026-10-02 · 文章

Whistle: Speech to Text in 16.9 MB

Cactus Compute 发布 16.9 MB 的端侧语音识别模型 Whistle:单文件纯 CPU零依赖,与 Needle 共用同一 C++ 推理引擎和量化容器支持英德法西意荷波兰语 30 秒片段转写自动语言检测(语言作为词表 token 输出)词级时间戳,以及不经解码直接产出 80ms 帧距的语音 embedding结构上 encoder/decoder 各 8 层 Simple Attention:mHC 残差 laneMonarch Hadamard MLP 替代 FFNdecoder 8 query 头对 2 KV 头第 3/7 层做 18,432 slot 的 engram lookup...

打开原文回到归档

Whistle: Speech to Text in 16.9 MB

  • ID: f9a7f01f
  • 原文链接: https://cactuscompute.com/blog/whistle
  • 作者: Jakub Mroz (Cactus Compute)
  • 日期: 2026-10-02
  • 分类: infra
  • 来源类型: article
  • 标签: speech-recognition, on-device, edge-ai, whisper, efficient-inference
  • 质量评分: 4/5
  • 抓取时间: 2026-10-09T20:22:55Z

中文导读

Cactus Compute 发布 16.9 MB 的端侧语音识别模型 Whistle:单文件、纯 CPU、零依赖,与 Needle 共用同一 C++ 推理引擎和量化容器,覆盖手机、可穿戴、机器人、智能家居、车机与微控制器。支持英德法西意荷波兰语 30 秒片段转写,自动语言检测(语言作为词表 token 输出)、词级时间戳(从 decoder attention 对齐),以及不经解码直接产出 80ms 帧距的语音 embedding。结构上 encoder/decoder 各 8 层 Simple Attention:mHC 残差 lane、Monarch Hadamard MLP 替代 FFN;decoder 8 query 头对 2 KV 头,第 3/7 层做 18,432 slot 的 engram lookup;每层门控 cross-attention 读 encoder,K/V 投影每片段只算一次全程复用,5 beam 只花 5 份转写缓存。Ladder 训练让每个深度都是独立训练的模型,加载时 --audio-depth 选择。Apple M4 Pro CPU 上 10 秒音频:TTFT 11.1ms(Whisper base 73.2ms、Moonshine tiny v2 22.8ms),解码 1319 tok/s(266 / 262);WER 在 LibriSpeech test-clean/test-other、SPGISpeech、Earnings-22、FLEURS 均值上领先大 8.6 倍的 Whisper base,Whisper 在 TED-LIUM、AMI、MLS 均值上占先。音频不出设备,浏览器 tab 内即可跑。

为什么值得关注

端侧 ASR 的三重信号叠加在一个模型里:体量(16.9 MB vs Whisper base 145.3 MB)、延迟(TTFT 11ms 级)、部署面(17 个平台预编译,从 watchOS 到 RISC-V 到浏览器 WASM)。更值得注意的是工程路线:语音模型与文本模型(Needle)共用同一引擎与容器,needle_complete 可以把音频直接变成 function call JSON——"语音进、工具调用出"成为端侧 agent 的一等能力,而不是外挂转写管道。

关键信息

  • 发布:Cactus Compute,2026-10-02;16.9 MB 单文件,CPU 运行,零依赖,权重在 Hugging Face(Cactus-Compute/whistle)
  • 三种能力:转写(7 种欧洲语言,30 秒/次,自动语言检测)、词级时间戳(含概率)、语音 embedding(每 80ms 帧一行,免解码)
  • 前端:16kHz 单声道,25ms 窗/10ms hop,80 log-mel bins 带限 250-3500Hz;卷积 stem(128 通道、kernel 9)三次下采样,30 秒 → 375 帧
  • Encoder:8 层 Simple Attention(4 条 mHC 残差 lane + Monarch Hadamard MLP),非因果 attention
  • Decoder:8 层 Laddered Simple Attention,宽 512,8 query 头对 2 KV 头,Q/K 48 维、V 64 维,Q/K/V 上 3-tap 因果卷积,第 3/7 层 engram lookup(18,432 slots)
  • 门控 cross-attention:x ← x + σ(g)·softmax(q̂K̂ᵀ/√d)V,K/V 投影每片段只算一次;5 beam = 5 份转写缓存,非 5 次 audio pass
  • Ladder 训练:每个深度(≥2 层)都是独立训练的模型,--audio-depth 加载时选择;encoder 永远全 8 层
  • 静音门:解码前测量响度范围,低于阈值直接返回空转写,不进 beam search
  • Benchmark(Apple M4 Pro CPU,10 秒音频,官方 runtime 默认参数):TTFT 11.1ms vs Whisper base 73.2ms / Moonshine tiny v2 22.8ms;解码 1319 tok/s vs 266 / 262;TTFT 随片段长度 5.9ms(5s)→ 36.3ms(30s),Whisper 因固定 pad 30s 而恒定
  • WER:LibriSpeech test-clean/test-other、SPGISpeech、Earnings-22、FLEURS 均值领先;TED-LIUM、AMI、MLS 均值 Whisper base 占先;Whisper normalizers 打分,Whistle 侧 86,174 条 utterance 实测,训练/验证数据无测试音频(checksum + speaker ID 核验)
  • 一引擎三用法:needle_load 读任意 .cact;语音+文本模型同载时 needle_complete 直接返回 function_calls + audio_text/audio_language JSON
  • 部署:17 个平台预编译(macOS/Linux/Android/iOS/watchOS/Windows ARM/RISC-V/MIPS/浏览器/WASI 等);C API 仅 needle_load/transcribe/embed 三个函数
  • 关联标签:speech-recognition, on-device, edge-ai, whisper, efficient-inference

One-liner

16.9 MB 纯 CPU 语音识别:WER 压过 8.6 倍大的 Whisper base,TTFT 11ms

English Summary

Cactus Compute released Whistle, a 16.9 MB speech-recognition model for mobiles, wearables, robots, smart home, automotive, and microcontrollers: one file, CPU-only, no dependencies, sharing Needle's C++ engine and quantisation. It transcribes up to 30-second clips in seven European languages with automatic language detection (emitted as a vocabulary token), word-level timestamps aligned from decoder attention, and speech embeddings at 80 ms frame pitch without decoding. Architecture: 8-layer Simple Attention encoder (mHC residual lanes, Monarch Hadamard MLPs) and laddered decoder with 8 query to 2 KV heads, engram lookups (18,432 slots) at layers 3 and 7, and per-layer gated cross-attention whose K/V projections run once per clip, so five beams cost five transcript caches rather than five audio passes. On an Apple M4 Pro CPU (10 s audio): 11.1 ms TTFT vs Whisper base's 73.2 ms, 1,319 tokens/s vs 266, and lower WER on LibriSpeech, SPGISpeech, Earnings-22 and the FLEURS average at 8.6x smaller. The same engine fuses speech with Needle's tool calling: needle_complete returns function calls and speech fields in one JSON object.

原文摘录

Today we release Whistle, a speech recognition model for mobiles, wearables, robots, smart home, automotive and microcontrollers. It is one 16.9 MB file, runs on the CPU with no dependencies, and loads into the same C++ engine as Needle, from the same container and the same quantisation.
Five beams therefore cost five short transcript caches, not five passes over the audio.
On the third line needle_complete takes the clip directly. The engine transcribes it, answers the transcript against your tools, and returns one JSON object with the calls and the speech fields, the speech ones prefixed audio_.
注:本文件为 content-fetcher 内容提取(2026-10-09);内容基于 opencli web read 抓取的原文,所有事实、数据与立场表述均出自原文。