DJ-AI ASR Grammar Corrector (T5-Base)
A lightweight grammar correction model fine-tuned from t5-base, specifically designed to correct common errors in automatic speech recognition (ASR) outputs — including homophones, verb tense issues, contractions, duplicated words, and more. Optimized for fast inference in (near) real-time ASR pipelines.
Model Details
- Base model:
t5-base
- Fine-tuned on: 90 million synthetic (noisy → clean) sentence pairs
- Training objective: Correct ASR-style transcription errors into clean, grammatical English
- Token count: ~60 million tokens per epoch
- Framework: Hugging Face Transformers + PyTorch
Benchmark Results
| Model | Type | Precision | Latency (s/sample) | VRAM (MB) | BLEU | ROUGE-L | Accuracy (%)¹ | Token Accuracy (%)² | Size (MB) |
|---|
| dj-ai-asr-grammar-corrector-t5-base | HF | fp32 | 0.1151 | 24.98 | 78.92 | 90.31 | 44.62 | 90.39 | 5956.76 |
| dj-ai-asr-grammar-corrector-t5-small | HF | fp32 | 0.0648 | 6.27 | 76.47 | 89.54 | 39.59 | 88.76 | 1620.15 |
| dj-ai-asr-grammar-corrector-t5-small-streaming | HF | fp32 | 0.0634 | 14.77 | 76.25 | 89.61 | 39.9 | 88.54 | 1620.65 |
- Accuracy is a measure of how well the model performs across the full sentence. That is, a prediction is only counted as "correct" if the entire corrected sentence exactly matches the reference sentence. So if the model corrects 1 out of 2 errors, but the final output does not exactly match the expected sentence, it's counted as a fail.
- Token Accuracy is a measure of how well the model performs at the token level.
$$\text{Token Accuracy (%)} = \left( \frac{\text{Number of Matched Tokens}}{\text{Total Reference Tokens}} \right) \times 100$$
Intended Use
| Use Case | ✅ Supported | 🚫 Not Recommended |
|---|
| Post-ASR correction | ✅ Yes | |
| Real-time ASR pipelines | ✅ Yes | |
| Batch transcript cleanup | ✅ Yes | |
| Grammar education tools | ✅ Yes | |
| Formal document editing | 🚫 | Model may be too informal |
| Multilingual input | 🚫 | English-only fine-tuning |
Corrects Common ASR Errors:
- Homophone mistakes (
their → they're)
- Subject-verb disagreement (
he go → he goes)
- Verb tense corruption (
i seen → i saw)
- Missing auxiliaries (
you going → are you going)
- Contraction normalization (
she is not → she isn't)
- Repeated words (
i i want → i want)
- Misused articles/prepositions/pronouns
Example