openslr/librispeech_asr
Viewer • Updated • 585k • 68.4k • 232
Non-Autoregressive CTC Speech Recognition for Egyptian Arabic + Code-Switching
Metro-ASR Small is a 61M parameter non-autoregressive CTC-based ASR model built on a modern Conformer encoder. It is specifically designed for Egyptian Arabic (العامية المصرية) with native Arabic-English code-switching support.
| Component | Details |
|---|---|
| Encoder | Conformer (12 layers, d_model=384, 6 heads) |
| Position Encoding | RoPE (Rotary Position Embeddings) |
| Feed-Forward | SwiGLU (Macaron-style dual FFN) |
| Normalization | RMSNorm (Pre-norm) |
| Convolution | SE-Gated Depthwise Separable (kernel=31) |
| Regularization | Stochastic Depth (rate=0.05) |
| Auxiliary Loss | Intermediate CTC at layer 6 |
| Tokenizer | BPE (SentencePiece, vocab=5000) |
| Decoding | CTC Greedy / Beam Search + KenLM |
| Parameters | 61.6M |
| Split | WER (%) | CER (%) |
|---|---|---|
| All | 46.85 | 28.41 |
| Arabic Only | 37.24 | 17.45 |
| Code-Switching | 36.32 | 17.44 |
Speed: RTF ~0.002 on CPU (500x faster than real-time)
pip install metro-asr
from metro_asr import MetroASREngine
engine = MetroASREngine.from_pretrained("small") # Auto-downloads this model
result = engine.transcribe("audio.wav")
print(result.text)
engine = MetroASREngine.from_pretrained(
"small",
lm_path="lm_5gram.bin", # Download from this repo
beam_width=100,
lm_alpha=0.5,
lm_beta=5.0,
)
result = engine.transcribe("audio.wav", beam_search=True)
print(result.text)
results = engine.transcribe_batch(["audio1.wav", "audio2.wav", "audio3.wav"])
for r in results:
print(f"{r.text} (RTF={r.rtf:.4f})")
| File | Description | Size |
|---|---|---|
model.pt |
Model checkpoint (weights + optimizer state) | ~706MB |
config.yaml |
Model architecture configuration | <1KB |
bpe.model |
SentencePiece BPE tokenizer model | ~200KB |
bpe.vocab |
BPE vocabulary file | ~100KB |
lm_5gram.bin |
KenLM 5-gram language model (optional) | ~6GB |
Trained on a combination of open-source Egyptian Arabic datasets and custom YouTube data:
@software{metro-asr-2025,
title = {Metro-ASR: Non-Autoregressive CTC-based ASR for Egyptian Arabic and Code-Switching},
author = {Mohammed Aly},
year = {2025},
url = {https://github.com/mohammedaly22/Metro-ASR}
}
MIT