trunk-reporter/imbe-asr-base-512d
09
IMBE-ASR Base (48.6M params, d=512, 8 layers)
Edge-friendly speech recognition from IMBE vocoder parameters. Runs at 15x real-time on a Raspberry Pi 5.
Code: trunk-reporter/imbe-asr | Best model: imbe-asr-large-1024d | P25 fine-tuned: imbe-asr-base-512d-p25
Results
Evaluated on LibriSpeech-IMBE speaker-split validation. The included 3-gram KenLM halves WER with minimal overhead.
For maximum accuracy, use imbe-asr-large-1024d (3.35% WER with 5-gram LM). Use this model for edge deployment where the large model doesn't fit.
Architecture
Conformer-CTC, trained on ~1,220 hours of IMBE-encoded speech, 25 epochs.
Files
Edge Deployment (Raspberry Pi 5, 4GB)
Usage
Greedy decode (fast, no dependencies)
import onnxruntime as ort, numpy as np
session = ort.InferenceSession("model_int8.onnx")
stats = np.load("stats.npz")
features = ((raw_params - stats["mean"]) / stats["std"]).astype(np.float32)
log_probs, out_lengths = session.run(None, {
"features": features.reshape(1, -1, 170),
"lengths": np.array([features.shape[0]], dtype=np.int64),
})Beam search + KenLM (recommended)
import onnxruntime as ort, numpy as np
from pyctcdecode import build_ctcdecoder
session = ort.InferenceSession("model_int8.onnx")
stats = np.load("stats.npz")
VOCAB = list(" ABCDEFGHIJKLMNOPQRSTUVWXYZ'")
labels = [""] + VOCAB
decoder = build_ctcdecoder(
labels=labels,
kenlm_model_path="lm/3gram.bin",
unigrams=open("lm/unigrams.txt").read().splitlines(),
alpha=0.7, # LM weight — tuned on LibriSpeech-IMBE
beta=2.0, # word insertion bonus
)
features = ((raw_params - stats["mean"]) / stats["std"]).astype(np.float32)
log_probs, out_lengths = session.run(None, {
"features": features.reshape(1, -1, 170),
"lengths": np.array([features.shape[0]], dtype=np.int64),
})
text = decoder.decode(log_probs[0, :out_lengths[0]], beam_width=100)Install dependencies: pip install pyctcdecode kenlm
Limitations
- Trained on clean speech, not real P25 radio. See imbe-asr-base-512d-p25 for P25 adaptation.
- English only.
