Speech recognition
Real-time speech recognition, trained from scratch.
A streaming speech model for Indian English in 19.3M parameters. Small enough to run live on a phone, with punctuation built in. Open source.
- 19.3M
- parameters
- 80.6%
- of words right on clean speech
- 20 ms
- to process 640 ms of audio on 1 CPU thread
- $30
- total training budget
See what TinyEar hears
Speech models don't read raw audio. The first step turns sound into a mel-spectrogram: how much energy sits in each frequency band, moment by moment. This one runs in your browser. Talk, whistle or snap and watch the bands move.
The microphone turns on only when you click. Audio stays in your browser.
Why
Most good speech-to-text models are too big to run on a phone without a server behind them. I wanted to see how small a model could get and still be useful, and I wanted to train it myself instead of fine-tuning someone else’s checkpoint.
How it works
Voice to text in four steps:
- Sound. An 80-band log-mel front end, a new frame every 10 ms, with 8x causal subsampling.
- Encoder. 12 causal Conformer blocks with RoPE and a 70-frame cache, about 5.6 seconds of memory.
- TDT decoder. A 2-token predictor that writes word pieces along with durations from 0 to 4, so it skips silence.
- Output. Capitals and punctuation come out of the model directly.
A CTC head with self-conditioning at block 6 helps training.
The trick: a looped transformer
Only 12 blocks are stored, but some of them run two or three times per chunk. That gives 17 block passes per chunk (22 with three loops) without adding a single weight.
Results
| WER on LibriSpeech test-clean | 20.7% (80.6% of words right) |
| WER on Svarah (Indian English) | 36.3% |
| Compute per 640 ms chunk | 20 ms on 1 CPU thread |
| Size | 19.3M parameters, 20 MB |
| Training budget | $30 |
WER is greedy TDT with a 640 ms chunk mask on normalised text. Speed is PyTorch fp32 on an Apple M2 Pro, median, not counting the wait for the chunk.
What broke
Augmenting the audio from step one made the small model stop listening: its loss stalled near 5.6. Warming up first, then adding augmentation, brought it down to 4.9 by step 600.
What I’m doing now
- Improving accuracy with reinforcement learning.
- Next: a multilingual Indic version (Tamil, Telugu, Kannada, Malayalam, Hindi and English), plus an open dataset on Hugging Face.
The weights are open on Hugging Face. Built with Modal, Hugging Face, PyTorch and ONNX.