Document the audio.cpp PR #824 adapter: ggml encoder on CPU or Metal, host decoder
Browse files
README.md
CHANGED
|
@@ -1,107 +1,115 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
pipeline_tag: automatic-speech-recognition
|
| 4 |
-
language:
|
| 5 |
-
- en
|
| 6 |
-
- de
|
| 7 |
-
- fr
|
| 8 |
-
- es
|
| 9 |
-
- it
|
| 10 |
-
- nl
|
| 11 |
-
- pl
|
| 12 |
-
tags:
|
| 13 |
-
- gguf
|
| 14 |
-
- audio.cpp
|
| 15 |
-
- speech-to-text
|
| 16 |
-
- on-device
|
| 17 |
-
- cpu
|
| 18 |
-
-
|
| 19 |
-
-
|
| 20 |
-
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
It
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
-
|
| 37 |
-
-
|
| 38 |
-
-
|
| 39 |
-
-
|
| 40 |
-
-
|
| 41 |
-
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
The
|
| 49 |
-
|
| 50 |
-
The official
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
```
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
pipeline_tag: automatic-speech-recognition
|
| 4 |
+
language:
|
| 5 |
+
- en
|
| 6 |
+
- de
|
| 7 |
+
- fr
|
| 8 |
+
- es
|
| 9 |
+
- it
|
| 10 |
+
- nl
|
| 11 |
+
- pl
|
| 12 |
+
tags:
|
| 13 |
+
- gguf
|
| 14 |
+
- audio.cpp
|
| 15 |
+
- speech-to-text
|
| 16 |
+
- on-device
|
| 17 |
+
- cpu
|
| 18 |
+
- metal
|
| 19 |
+
- fp32
|
| 20 |
+
- experimental
|
| 21 |
+
---
|
| 22 |
+
|
| 23 |
+
# Whistle GGUF (FP32, experimental)
|
| 24 |
+
|
| 25 |
+
This is a community GGUF conversion of [Cactus Compute Whistle](https://huggingface.co/Cactus-Compute/whistle).
|
| 26 |
+
It packages the published FP32 checkpoint for an experimental `whistle_asr` adapter in audio.cpp.
|
| 27 |
+
It is not an official Cactus Compute release.
|
| 28 |
+
|
| 29 |
+
**Stock audio.cpp cannot run this model yet.** The adapter is proposed in
|
| 30 |
+
[audio.cpp pull request #824](https://github.com/0xShug0/audio.cpp/pull/824) and has not been merged.
|
| 31 |
+
Until it lands, downloading this file alone does not provide a usable audio.cpp runtime.
|
| 32 |
+
GGUF is a container format, not a guarantee of compatibility with other GGUF applications.
|
| 33 |
+
|
| 34 |
+
## Artifact and provenance
|
| 35 |
+
|
| 36 |
+
- File: `whistle-f32.gguf`
|
| 37 |
+
- Size: **220,831,616 bytes** (approximately 220.8 MB)
|
| 38 |
+
- SHA-256: `1167c811abad2fc539a1116e1b7031ba4a07c8f5b2e75ab3a389ae370efede8b`
|
| 39 |
+
- Source: `Cactus-Compute/whistle`
|
| 40 |
+
- Pinned source revision: `b358ddadd89b7a713b5aa131f23032d3cca1b251`
|
| 41 |
+
- Weights: `checkpoints/whistle.safetensors`, stored as 116 FP32 tensors without quantization
|
| 42 |
+
- Embedded resources: source configuration and license, custom tokenizer blob, mel filterbank, and two Hadamard permutations
|
| 43 |
+
- Embedded audio.cpp model specification: `whistle_asr`
|
| 44 |
+
|
| 45 |
+
**Modification notice:** The source checkpoint has been repackaged as GGUF.
|
| 46 |
+
Tokenizer, frontend, and permutation resources have been extracted from the official `whistle.cact` and embedded alongside the FP32 weights.
|
| 47 |
+
The experimental audio.cpp model specification is additional conversion metadata.
|
| 48 |
+
The weights are not a dequantization of the compact `.cact` model.
|
| 49 |
+
|
| 50 |
+
The official `.cact` file uses Cactus Quants and is approximately 16.9 MB.
|
| 51 |
+
This FP32 conversion is much larger and can produce different spelling or number formatting.
|
| 52 |
+
The official model's published speed and accuracy results do not establish results for this conversion or adapter.
|
| 53 |
+
|
| 54 |
+
## Experimental runtime
|
| 55 |
+
|
| 56 |
+
The adapter lives on the `feat/whistle-asr` branch of [BumpyClock/audio.cpp](https://github.com/BumpyClock/audio.cpp/tree/feat/whistle-asr), based on audio.cpp `main`.
|
| 57 |
+
It runs in-process C++ inference and does not use Needle, Python, ONNX Runtime, or a server during recognition.
|
| 58 |
+
The mel frontend reuses audio.cpp's shared `NemoMelFrontend`. The encoder runs as one ggml graph on the CPU or Metal backend,
|
| 59 |
+
built from audio.cpp framework modules with Whistle-specific math kept model-local. The autoregressive decoder runs on the host CPU.
|
| 60 |
+
CUDA, Vulkan, and HIP are not validated and are rejected at session creation.
|
| 61 |
+
|
| 62 |
+
With an audio.cpp build that contains the experimental adapter, use:
|
| 63 |
+
|
| 64 |
+
```sh
|
| 65 |
+
audiocpp_cli --task asr --family whistle_asr --backend cpu \
|
| 66 |
+
--model whistle-f32.gguf --audio clip_16k_mono.wav
|
| 67 |
+
# or, on Apple silicon:
|
| 68 |
+
audiocpp_cli --task asr --family whistle_asr --backend metal \
|
| 69 |
+
--model whistle-f32.gguf --audio clip_16k_mono.wav
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
Add `--language en`, `de`, `fr`, `es`, `it`, `nl`, or `pl` to force a language.
|
| 73 |
+
Otherwise, the model detects the language.
|
| 74 |
+
This example requires the adapter; it is not a command for an unmodified upstream build.
|
| 75 |
+
|
| 76 |
+
## Supported scope and limitations
|
| 77 |
+
|
| 78 |
+
The adapter supports offline transcription of finite 16 kHz mono audio, up to 30 seconds per recording.
|
| 79 |
+
Only FP32 model tensors are admitted.
|
| 80 |
+
The model advertises English, German, French, Spanish, Italian, Dutch, and Polish.
|
| 81 |
+
Local recognition checks exercised English and German recordings plus one short and one 20 to 26 second synthetic clip per language;
|
| 82 |
+
these are prompt-agreement spot checks, not an accuracy benchmark.
|
| 83 |
+
|
| 84 |
+
The adapter does not implement streaming, word timestamps, keyword biasing, speech embeddings, resampling, or long-form chunking.
|
| 85 |
+
Metal accelerates the encoder only; decoding stays on the CPU.
|
| 86 |
+
Decoding uses a 320-text-token ceiling and reports an error if EOS is not produced, rather than presenting partial output as complete.
|
| 87 |
+
Recognition can contain errors or hallucinations, particularly with quiet or non-speech audio.
|
| 88 |
+
This upload does not include a speech activity detection system.
|
| 89 |
+
|
| 90 |
+
## Observed recognition
|
| 91 |
+
|
| 92 |
+
A local English sample produced:
|
| 93 |
+
|
| 94 |
+
> Some call me Nature. Others call me Mother Nature. I've been here for over 4.5 billion years, twenty two thousand five hundred times longer than you.
|
| 95 |
+
|
| 96 |
+
A synthetic German recording produced:
|
| 97 |
+
|
| 98 |
+
> Guten Morgen, wie wird das Wetter heute?
|
| 99 |
+
|
| 100 |
+
The German result matched the official runtime for that recording, both with automatic language detection and a forced German hint.
|
| 101 |
+
These are example checks, not a multilingual accuracy benchmark or production qualification.
|
| 102 |
+
|
| 103 |
+
## License and attribution
|
| 104 |
+
|
| 105 |
+
The source model is licensed under Apache 2.0.
|
| 106 |
+
A copy of the source license is included as `LICENSE` and embedded in the GGUF.
|
| 107 |
+
Whistle was created by Cactus Compute.
|
| 108 |
+
|
| 109 |
+
Sources used for the conversion and runtime work:
|
| 110 |
+
|
| 111 |
+
- [Pinned official model and license](https://huggingface.co/Cactus-Compute/whistle/tree/b358ddadd89b7a713b5aa131f23032d3cca1b251)
|
| 112 |
+
- [audio.cpp pull request #824](https://github.com/0xShug0/audio.cpp/pull/824) and the [`feat/whistle-asr` branch](https://github.com/BumpyClock/audio.cpp/tree/feat/whistle-asr)
|
| 113 |
+
- [Pinned public Whistle reference reconstruction](https://huggingface.co/mrfakename/whistle-ONNX/tree/14fc92cb09ad5c271fe9a4ec4be70274790050d2)
|
| 114 |
+
|
| 115 |
+
The model and runtime remain separate works. This repository distributes converted model assets, not the experimental audio.cpp adapter.
|