antirez/voxtral.c
FreePure C inference of Mistral Voxtral Realtime 4B speech to text model
About antirez/voxtral.c
A pure C implementation of the inference pipeline for Mistral AI's Voxtral Realtime 4B speech-to-text model. Zero external dependencies beyond the C standard library. Supports MPS (Apple Silicon) and BLAS backends, with a chunked encoder that uses overlapping windows to bound memory usage regardless of input length. Audio can be piped from stdin, captured live from the microphone (macOS), or transcribed via ffmpeg from any format. Includes a streaming C API (vox_stream_t) for incremental transcription. Also provides a self-contained Python reference implementation (python_simple_implementation.py). Motivation: Mistral released the model open weights but limited inference to a partnership with vLLM; this project offers a standalone, understandable implementation.
Key Features
Pros & Cons
- Lightweight with zero external dependencies
- Fast MPS inference on Apple Silicon
- Streaming support with low latency
- Includes both C and Python implementations for clarity
- Open source with permissive license (MIT)
- Can handle arbitrary length audio via chunked encoder
- BLAS backend is slow due to continuous bf16-to-fp32 conversion
- Live microphone only supported on macOS
- Project still in early stage: tested on few samples, not production-ready
- Requires downloading ~8.9GB model weights
- No Windows or Linux live mic support yet