← Back to Leaderboard
Vantirez

antirez/voxtral.c

Native C Voxtral 4B inference for local streaming speech-to-text

View on GitHub ↗
Engineering Health (Methodology)
C · 47/100
Maintenance Activity
● Updated 9mo ago
Latest Release
Rolling commits (main)
Commercial License Check
MIT · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance6/35
Fork Adoption15/25
Release Cadence6/20
License Clarity20/20
Local AICLIGPUAPI
Total Stars
★ 1,754
24h Growth
+0
7d Growth
+0
Forks
129

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

antirez/voxtral.c Star History (2026-02-04 - 2026-12-03) ALL-TIME STAR HISTORY (2026-02 – 2026-12) +1.8k in 302d · avg +6/day 1.9k 926 0 2026-02-04: ★ 12026-02-28: ★ 1,4252026-03-21: ★ 1,5142026-04-11: ★ 1,5842026-05-02: ★ 1,6172026-05-23: ★ 1,6472026-06-13: ★ 1,6762026-07-04: ★ 1,6892026-07-25: ★ 1,7012026-08-15: ★ 1,7202026-09-05: ★ 1,7322026-09-26: ★ 1,7392026-10-17: ★ 1,7452026-11-05: ★ 1,7482026-12-03: ★ 1,754 ★ 1.8k 2026-02 2026-07 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

voxtral.c is a native inference engine for Mistral Voxtral Realtime 4B, not a general model runner. Audio is normalized to 16 kHz and passed through mel feature extraction, a convolutional stem, and a 32-layer causal transformer encoder with a 750-position attention window. After 4× downsampling, a 5120→3072→3072 adapter with GELU feeds a 26-layer Ministral-3-based decoder. The decoder uses grouped-query attention with 32 query heads and 8 KV heads; the Tekken vocabulary has 131,072 entries.

The source separates audio processing, encoder, decoder, kernels, safetensors loading, and tokenization into dedicated C modules. Apple acceleration lives in voxtral_metal.m and voxtral_shaders.metal; the BLAS build uses Accelerate on macOS or OpenBLAS on Linux. BF16 weights are memory-mapped from safetensors. main.c provides the CLI, while voxtral.h exposes an in-process streaming API that feeds audio, queues decoded text, and finalizes pending input. There is no packaged network service.

Key Capabilities & Differentiators

The CLI accepts 16-bit PCM WAV and resamples it to 16 kHz. --stdin distinguishes RIFF WAV from raw signed 16-bit little-endian, 16 kHz mono PCM, so ffmpeg can act as a format bridge without becoming an inference dependency. On macOS, --from-mic captures from the default input via AudioQueue Services and strips detected silence. The model covers 13 languages, including English, Mandarin Chinese, Japanese, Hindi, and Arabic. Output arrives incrementally, with transcript text on stdout and diagnostics on stderr.

Overlapping encoder chunks bound audio-encoding state, while a rolling decoder KV cache caps history at 8,192 positions. This allows streams to continue beyond the context window without retaining all preceding context. --monitor exposes encoder passes, invalid or control-only token streaks, watchdog timeouts, and resets, which help distinguish a stalled decode from an encoder that is simply waiting for more audio.

Trade-offs & Limitations

Compared with a hosted Whisper API, voxtral.c keeps audio and inference local and offers direct access to incremental text. In exchange, you provision the hardware, stage the model, and build any service layer yourself. The M3 Max measurements show how much backend choice matters: for 3.6 seconds of audio, the encoder took 284 ms on Metal versus roughly 8 seconds on BLAS; short-sequence decode was 23.5 ms per step versus 335 ms. Metal reuses cached FP16 weights, while BLAS repeatedly converts BF16 weights to FP32. These are hardware-specific measurements, not a head-to-head benchmark against Whisper.

For live input, the default 2-second encoder interval is a throughput compromise: reducing -I can make text arrive sooner, but each encoder call adds roughly 50 ms of fixed overhead in the measured setup. Offline file transcription does not use this interval. Testing has covered only a few samples, and microphone input may skip audio when processing falls behind. Before adopting it for continuous capture, test cache rollover, transcript continuity across resets, and whether target hardware keeps up without dropping input.

Hardware & Deployment Guide

Stage the model with ./download_model.sh, which populates voxtral-model/ with consolidated.safetensors (about 8.9 GB), tekken.json, and params.json. On Apple Silicon, build with make mps; use make blas with Accelerate on Intel macOS or OpenBLAS on Linux. A file smoke test is ./voxtral -d voxtral-model -i samples/test_speech.wav. Once the assets are staged, native inference runs offline without Python, CUDA, or vLLM. The separate Python reference uses PyTorch, safetensors, soundfile, and soxr.

Size Apple Silicon deployments for the roughly 8.4 GB FP16 Metal weight cache, up to roughly 1.8 GB of decoder KV cache, and about 200 MB of working buffers, plus headroom for mapped BF16 pages and the rest of the system. Memory mapping makes weights available without reading them all up front; it does not remove their runtime memory cost. No tagged release is listed. Pin a tested commit and validate the build, sustained memory use, and long-stream behavior on the hardware you intend to deploy.

Model pipeline: 32-layer causal audio encoder, 4× downsampling, and a 26-layer Ministral-3-based decoder with 32 query heads and 8 KV heads.
Bounded streaming state: Overlapping encoder chunks and an 8,192-position rolling decoder KV cache cap inference state without retaining unlimited context.
Metal execution: BF16 weights are staged as FP16 on the GPU, and each decoder token runs in a single Metal command buffer.
Native integration: vox_stream_t accepts incremental audio and queues text for retrieval; the CLI keeps transcript output on stdout and diagnostics on stderr.
Audio input: 16-bit PCM WAV is resampled to 16 kHz; stdin also accepts raw 16 kHz mono s16le; live microphone capture is macOS-only.
Streaming control: -I trades responsiveness for encoder batching, while --monitor exposes decode stalls, watchdog timeouts, and resets.
Best For

Local captions, privacy-sensitive transcription prototypes, and native applications that need incremental text on Apple Silicon.

Skip If

You need an out-of-the-box hosted endpoint, dependable real-time throughput on a CPU-only Linux deployment, or unattended long-running capture without first validating drop and reset behavior.

Reviewed on 2026-12-02 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

Local AICLIGPUAPI
pip install torch safetensors soundfile soxr
python python_simple_implementation.py voxtral-model audio.wav

Comparison vs. Top Voice, Vision & Video Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
voxtral.c ★1.8k—CMITNative C Voxtral 4B inference for local streaming speech-to-text
whisperX26.5k+677PythonBSD-2-ClauseBatched Whisper with forced alignment for word timings and optional speaker labe
sherpa-onnx16.4k+136C++Apache-2.0C++ and ONNX Runtime SDK for offline speech and real-time transcription
moonshine11.7k+48C++—On-device C++ SDK for live transcription, intent recognition, and speech synthes

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/antirez/voxtral.c.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

antirez/voxtral.c Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about voxtral.c

How do I integrate streaming transcription into an application?

Load the model with vox_load, create a vox_stream_t with vox_stream_init, feed audio with vox_stream_feed, and drain pending text with vox_stream_get. Call vox_stream_finish at end of input, then drain once more. Returned token strings remain valid until vox_stream_free. This is an in-process API, not an HTTP endpoint; for a subprocess integration, send audio over stdin and read transcripts from stdout.

How much memory should I budget, and is CPU inference practical?

Budget about 8.9 GB of disk space for the BF16 weights. For Metal, size unified memory with the roughly 8.4 GB FP16 GPU weight cache, up to about 1.8 GB of decoder KV cache, about 200 MB of working buffers, and headroom for the OS and mapped pages in mind. These are component figures, not a measured minimum for the whole process. BLAS avoids the Metal cache but repeatedly converts BF16 weights to FP32; test throughput before relying on it for live audio.

Can I use it commercially and keep audio on premises?

Yes, both licenses allow commercial use subject to their terms. The engine is MIT-licensed; the Mistral model is licensed separately under Apache-2.0. If you redistribute binaries or weights, handle the applicable license notices separately. Inference can stay offline once the model is staged, but your application still owns recording consent, retention, and transcript access controls.

When is this a better choice than a hosted Whisper API?

Choose voxtral.c if audio must stay local, you want incremental text in a native process, and you can provision and test the hardware. Choose a hosted Whisper API if avoiding model downloads, local compute, and service maintenance matters more than controlling the execution environment. The M3 Max benchmark does not establish a speed or accuracy advantage over Whisper; compare both on representative audio and measure time to first text and transcript quality.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining antirez/voxtral.c? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature antirez/voxtral.c on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare