English | 日本語
A 5-minute quick start for Vokra. This guide gets VAD → ASR → TTS running on CPU. For GPU backends (Metal / CUDA) and distribution artefacts (iOS / Unity / Python), see the "Next steps" section at the end.
- Rust toolchain: 1.89 or newer (
rustup default stable). 1.89 is the effective MSRV: the workspace declaresrust-version = "1.85"(the floor for edition 2024), butvokra-backend-cpuraises its own floor to 1.89 for the AVX-512 intrinsics stabilized there, and that crate is in every build. CI verifies this in themsrvjob. - git: for cloning the repository
- curl or wget: for downloading the checkpoint files used by the sample conversion recipes
- uv + Python 3.12: only needed to prepare checkpoints consumed by the
converter. Run every Python command through uv; the Vokra runtime itself
has no Python dependency (
FR-LD-05). - Disk: 2–4 GB for the sample models (Whisper base + a piper-plus voice)
The Vokra runtime is zero external dependency — the root Cargo.lock
only contains vokra-* crates — so no system packages beyond the Rust
toolchain are required.
git clone https://github.com/ayutaz/vokra.git
cd vokra
cargo build --release -p vokra-cliThis produces the CLI at target/release/vokra-cli. Build the C ABI
separately with cargo build --release -p vokra-capi when needed. Reference
CLI build time: ~2 minutes on a MacBook Air M2 (cold).
The Vokra runtime loads GGUF only — ONNX graphs are never loaded at runtime, only through the offline conversion tool. Three common recipes:
# Upstream ONNX → GGUF
wget https://github.com/snakers4/silero-vad/raw/master/src/silero_vad/data/silero_vad.onnx
./target/release/vokra-cli convert \
--model silero-vad \
--input silero_vad.onnx \
--output silero_vad.gguf# Hugging Face safetensors → GGUF (size auto-detected from checkpoint shape)
uv run --no-project --python 3.12 \
--with transformers --with safetensors python - <<'PY'
from transformers import WhisperForConditionalGeneration
m = WhisperForConditionalGeneration.from_pretrained('openai/whisper-base')
m.save_pretrained('whisper-base', safe_serialization=True)
PY
./target/release/vokra-cli convert \
--model whisper \
--input whisper-base/model.safetensors \
--output whisper-base.ggufRun conversion, validation, and publication on VAST when the aggregate model artefacts are 2 GB or larger. Count all checkpoint shards and do not stage a large converted artefact back onto a memory-constrained development Mac.
To K-quantize for smaller footprint:
./target/release/vokra-cli convert \
--model whisper \
--input whisper-base/model.safetensors \
--output whisper-base.q4_k.gguf \
--quantize q4_k# piper-plus voice ONNX + config.json → GGUF
# Example voice: en_US-lessac-medium
wget https://huggingface.co/rhasspy/piper-voices/resolve/main/en/en_US/lessac/medium/en_US-lessac-medium.onnx
wget https://huggingface.co/rhasspy/piper-voices/resolve/main/en/en_US/lessac/medium/en_US-lessac-medium.onnx.json \
-O en_US-lessac-medium.config.json
./target/release/vokra-cli convert \
--model piper-plus \
--input en_US-lessac-medium.onnx \
--config en_US-lessac-medium.config.json \
--output en_US-lessac-medium.ggufvokra-cli run auto-selects the task from the GGUF's vokra.model.arch
metadata (Whisper→ASR / Silero VAD→VAD / piper-plus→TTS).
./target/release/vokra-cli run \
--model silero_vad.gguf \
--input speech.wav
# Output: per-frame speech probabilities./target/release/vokra-cli run \
--model whisper-base.gguf \
--input speech.wav
# Output: transcribed text./target/release/vokra-cli run \
--model en_US-lessac-medium.gguf \
--text "Hello from Vokra." \
--output hello.wav
# Output: hello.wav (22050 Hz mono PCM)# CPU RTF
./target/release/vokra-cli bench --model whisper-base.gguf --input speech.wav
# GPU (Metal on macOS / CUDA on Linux with hardware)
cargo build --release -p vokra-cli --features metal # macOS
cargo build --release -p vokra-cli --features cuda # Linux with system CUDA
./target/release/vokra-cli bench --model whisper-large-v3.gguf \
--input speech30s.wav --backend cudaRTF < 1.0 means real-time. The values below are acceptance targets, not a
guaranteed result on every machine. The RTX 4090 range 0.081–0.115 is a dated,
single-shot VAST reference from 2026-07-07, retained in
docs/perf/cuda-large-v3-baseline.json and
the variance report; it is not a current
CPU or Metal benchmark. Re-run bench on the target hardware before making a
performance claim.
Include include/vokra.h and link libvokra (see the C ABI
example in the top-level README):
cargo build --release -p vokra-capi#include "vokra.h"
vokra_session_t *s = NULL;
vokra_session_create_from_file("whisper-base.gguf", &s);
char *text = NULL;
vokra_asr_transcribe(s, pcm, num_samples, 16000, &text);
printf("%s\n", text);
vokra_string_free(text);
vokra_session_destroy(s);- Per-platform tutorials:
docs/tutorials/ - Adding a backend: backend-guide.md
- API reference: api-reference.md
- Migrating from another runtime: Migration Guide (from ONNX Runtime / whisper.cpp / sherpa-onnx)
- License / Compliance:
docs/license-audit.md,docs/legal-compliance.md
error: model file has no vokra.model.arch metadata: the GGUF was produced by a non-Vokra tool (e.g.llama.cpp). The Vokra runtime only accepts GGUFs written by its own converter — regenerate with thevokra-cli convertrecipes above.error: backend does not implement op X: GPU backends do not silently fall back to CPU (FR-EX-08). Retry with--backend cpuor open an issue with the model / op name.error: research flag required for CC-BY-NC weight: non-commercial weights (F5-TTS / Fish-Speech / EnCodec) are refused by the compliance gate. Explicit opt-in is required for research use.