Transcribe.cpp
Introducing transcribe.cpp
"I am incredibly thrilled to finally unveil transcribe.cpp to the world today!"
Launched in April 2026, transcribe.cpp is a transcription library built upon the ggml framework. It is designed to provide comprehensive support for the most current transcription models available. To ensure absolute reliability, every model hosted under the handy-computer Hugging Face organization has undergone rigorous numerical validation and Word Error Rate (WER) testing to ensure it mirrors the reference implementation perfectly.
The Motivation: Solving Distribution Pain
This project was born out of the frustration of trying to ship a cross-platform speech-to-text application to a wide audience. In my experience, the current ASR (Automatic Speech Recognition) inference landscape is fragmented problematic.
The Dilemma
Previously, the options were limited and inefficient:
- Apple Ecosystem: You could use
MLX, but that forced the maintenance of two separate engines and the need to port models twice. - General Support: I relied on
ONNXfor quick integration into Handy, but CPU-only performance left too much potential on the table. - The "Wild West": There are various libraries claiming broad model support, but they often suffer from anonymous authorship and a lack of transparent testing.
I found myself asking: Who is providing bindings for actual mobile or desktop apps? How do I know the engine's output matches the reference? Can it run on the GPU without requiring a massive PyTorch installation?
transcribe.cpp is the answer to those questions.
Core Features & Capabilities
The library provides a high-performance, accurate inference engine with an expansive range of model support.
Technical Specifications
| Feature | Details |
|---|---|
| Model Support | 16 ASR Families (60+ individual models) |
| Hardware Acceleration | Vulkan, Metal, CUDA, and TinyBLAS |
| Transcription Modes | Streaming & Batch Processing |
| Validation | Full numerical verification & WER sweeps |
| Compatibility | Near drop-in replacement for whisper.cpp |
Language Bindings
To ensure the library is actually usable in production environments, I've implemented first-party support for four key languages:
- Python
- JavaScript / TypeScript
- Rust
- ObjC / Swift
Note: I welcome community contributions for additional bindings, provided the contributors can handle the ongoing maintenance.
Deep Dive: Engineering Goals
1. Ubiquitous Acceleration
A primary objective was ensuring any ASR model could run via Vulkan. I believe this is the absolute baseline for any application shipping local inference. To prove this, I've published benchmarks using:
- Fedora: Ryzen 4750U (utilizing both CPU and Vulkan).
- Apple: M4 Max.
2. Rigorous Numerical Verification
I wanted to eliminate the uncertainty I felt when using random .onnx files from Hugging Face. To guarantee accuracy, we use a two-step process:
- Numerical Validation: Comparing raw inference values against the reference.
- WER Sweeps: Running thousands of utterances to ensure the final text output is identical or nearly identical to the reference.
The mathematical goal is to minimize the Word Error Rate: (Where = substitutions, = deletions, = insertions, and = total words)
All resulting data is publicly available in the transcribe.cpp repository and on Hugging Face.
3. The whisper.cpp Transition
Because Handy originally relied on whisper.cpp, I designed transcribe.cpp to be a largely compatible replacement. This allows us to continue supporting the popular .bin files. While some niche flags from whisper.cpp are not yet implemented, the core implementation is solid and offers comparable performance.
The "Handy" Connection & Future Vision
This library is a direct result of the challenges I faced with Handy. Without that project, I wouldn't have encountered the diverse use cases for ASR or the struggle of supporting multiple models.
My commitment: Just as I have maintained Handy, I intend to maintain transcribe.cpp as a contribution to the open-source ecosystem. If there are edge cases I've missed, I encourage you to contribute!
Democratizing Local STT
The ultimate goal is to make local ASR accessible. There is no reason to send private voice data to a cloud service when:
- An RK3566 (with a very modest CPU) can perform transcription faster than real-time.
- SOTA models can run on just a few watts of power.
// Conceptual usage of transcribe.cpp
auto engine = transcribe::load_model("sota_model.bin");
auto result = engine.transcribe_streaming(audio_buffer);
std::cout << "Transcription: " << result.text << std::endl;
While transcribe.cpp doesn't solve every problem in the industry, it is a step toward a future where local inference is the standard.
Gratitude
I am deeply thankful to everyone who supported this journey, with special mentions to:
- Mozilla AI and their BiR program.
- Davide from Mozilla AI.