Griot Edge
Ghanaian speech recognition in 60.9 million parameters.
A streaming Conformer CTC model for Akan, Dagbani, Dagaare, Ewe, Fante, Ghanaian English, and Ga. Stream live audio over WebSockets, serve concurrent HTTP single/batch requests, or run recordings locally across CPU, NVIDIA CUDA, and Apple Silicon MPS. The 151-character vocabulary preserves case, punctuation, and orthographic vowels.
Quick start · Results · Live streaming, batch & server · Serving & WebSocket API · Deployment guide · Full benchmarks
| At a glance | |
|---|---|
| Model | 60.9M parameters · 17-layer Parallel Conformer · CTC |
| Input | 16 kHz mono; helpers resample and mix down other audio |
| Context | Selectable lookahead; default 13 (325 ms), causal 0 |
| Long audio (>30s) | Silence-aware VAD splitting ([20s, 28s]) + DP word alignment stitching |
| Decoding | Bundled multilingual KenLM; optional Flashlight or greedy |
| Execution | CPU FP32 · Apple Silicon MPS BF16 · NVIDIA CUDA BF16 |
| License | CC BY-NC-SA 4.0 |
Results
26.93% WER / 14.59% CER on the internal test set with 13-frame lookahead and KenLM. Lower is better. These are acoustic-model evaluation results, separate from the speed benchmarks below.
Compared with Griot Nano 1
| Model / decoding | Parameters | Test utterances | CER ↓ | WER ↓ |
|---|---|---|---|---|
| Griot Nano 1, greedy | 153M | 99,547 | 13.66% | 29.19% |
| Griot Edge, greedy | 60.9M | 109,008 | 15.04% | 34.94% |
| Griot Edge, KenLM beam | 60.9M | 109,008 | 14.59% | 26.93% |
Edge has about 60% fewer parameters and selectable streaming lookahead. The accuracy rows are not a matched benchmark: Nano and Edge use different test populations, and the KenLM row also changes decoding. They do not establish an accuracy improvement over Nano. A shared-test-set comparison is still needed.
Within Edge's own test set, KenLM reduces WER from 34.94% to 26.93% at the default lookahead: 8.01 percentage points. Causal KenLM decoding scores 28.86% WER / 15.81% CER.
Scores normalize references and predictions with NFC, lowercase, and tone-mark removal. The evaluated beam uses width 25, LM weight 0.5, and word bonus 1.0. These accuracy scores do not validate the optional Flashlight preset. See evaluation details and source breakdown and release metrics.
Quick start
With uv installed:
uvx --from huggingface-hub hf download Qlerqly/griot-edge --local-dir griot-edge
cd griot-edge
uv venv --python 3.12 .venv
uv pip install --python .venv/bin/python -r requirements-server.txt
.venv/bin/python inference.py --model-dir . --audio sample.wav
The default uses the bundled KenLM and 13-frame lookahead. Add --greedy to skip the LM, or --lookahead-frames 0 for causal inference. Use --device mps --dtype bf16 on Apple Silicon GPU, --device cuda --dtype bf16 on supported NVIDIA GPU, or --device cpu --dtype fp32 on CPU. For local microphone capture (inference.py --live or client.py --mode stream), also install requirements.txt (sounddevice).
Live streaming, batch & server
Production ASGI server (serve.py & client.py)
serve.py provides a unified FastAPI/Uvicorn server supporting real-time WebSocket streaming (WS /v1/stream, subprotocol griot-v1 with incremental interim hypotheses and VAD silence-hangover utterance commits) alongside concurrent HTTP single and batch endpoints (POST /v1/transcribe, POST /v1/transcribe/batch, GET /health) backed by dynamic 20 ms micro-batch request coalescing (up to batch 8):
# Start unified streaming + batch server (auto-selects CUDA -> MPS -> CPU)
.venv/bin/python serve.py --model-dir . --device auto --dtype auto --port 8000
# Stream an audio file in paced real time over WebSocket
.venv/bin/python client.py --mode stream --uri ws://127.0.0.1:8000/v1/stream \
--audio sample.wav --chunk-size-ms 100 --realtime
# Submit concurrent or batched HTTP transcription requests
.venv/bin/python client.py --mode batch --uri http://127.0.0.1:8000 \
--audio recording-a.wav recording-b.flac --timestamps --output results.json
Long audio (>30s) chunking & offline batch CLI
Recordings longer than 30 seconds default to silence-aware VAD splitting (chunking.py, vad.py): pauses (RMS < 0.015 for >= 300 ms) in the [20s, 28s] window receive clean 0-overlap midpoint cuts, while uninterrupted speech falls back to 28s windows with 1.5s overlap stitched via CTC Viterbi word timestamps (ctc_alignment.py) and Needleman-Wunsch dynamic programming so words are neither clipped nor duplicated at boundaries. Pass --chunk-mode fixed for legacy 30-second / 5-second frame-grid joining.
# One-shot multi-file offline batch CLI (no server required)
.venv/bin/python batch_inference.py --model-dir . --chunk-mode vad \
--audio recording-a.wav recording-b.flac --batch-size 8 --output results.json
Start at batch 8. GPU capacity was tested through 128; CPU through 8. Full WebSocket & REST API guide · Offline batch library & manifests · Docker, CUDA & reverse proxy guide
Faster decoding
uv pip install --python .venv/bin/python -r requirements-flashlight.txt
.venv/bin/python batch_inference.py --model-dir . --audio recording.wav \
--decoder-backend flashlight --batch-size 8
Native commands default to pyctcdecode. Docker bundles both backends, launching serve.py by default (--mode server) or batch_inference.py (--mode cli). Flashlight uses a closed word lexicon and changes transcripts; validate names, unseen words, and your languages before choosing it for accuracy-sensitive work. Decoder details
Measured throughput & streaming latency
Live ASGI server (
serve.py) on Apple M5 Pro MPS (BF16):- WebSocket
/v1/stream:9.6–17.8 msp95 chunk latency,115.0 mstime-to-first-transcript (7.2×faster than CPU),0.10 msutterance finalization. - Concurrent HTTP
/v1/transcribe(8 clients): 656.8 audio-s/s (RTF = 0.0015),70.2 msmedian latency (20.0×faster than CPU). - Long audio (
68.43scontinuous speech): 87.8 ms (RTF = 0.0013,779×real-time) across 3 silence cuts with 199 aligned words and 0 boundary artifacts.
- WebSocket
Offline batch capacity (
128 × 30-second inputs = 64 minutes of audio, batch 128, BF16 GPU acoustics, median of 3 runs):
| Hardware | pyctcdecode | Flashlight | Speedup |
|---|---|---|---|
| Apple M5 Pro GPU + CPU, 6 Torch threads | 10.524 s | 5.056 s | 2.08× |
| NVIDIA L4 + Modal host CPU, 4 allocated cores | 26.127 s | 13.321 s | 1.96× |
Host CPUs affect decoder time, so compare backends within each row. Server & offline benchmark report · All CPU/GPU/L4 batch-size sweeps · Flashlight comparisons
Limitations
- Akan source quality varies. Reported WER is 19.15% on human-transcribed sources versus 49.98% on machine-transcript sources at the default tier with KenLM. These are different source subsets, not a controlled causal comparison. Counts and CER.
- Coverage is mainly Ghanaian speech. Listed languages do not imply equal accuracy; Fante has no separate row in the internal six-language evaluation.
- Lookahead needs care. Use the default 13-frame or causal tier; 6 and 26 are available. The 51-frame and full-context settings are outside the validated release tiers. Lookahead is not total service latency.
- CUDA BF16 can change transcripts across batch sizes. This occurred on L4; check representative speech at your intended batch size. Docker on macOS cannot use the Apple GPU; run MPS natively.
Training & license
Training used 44,000 audio hours of pretraining, 12,000 hours of speech/no-speech post-training, then 10,000 hours with intermediate CTC and variable lookahead. Sources follow Nano 1, adding KasaSpeech English–Twi and the University of Ghana Dagbani/Dagaare subsets of WAXAL.
Released under CC BY-NC-SA 4.0. See source acknowledgements, license audit, and license text.
- Downloads last month
- 52