Instructions to use tanzilidrisi/Foreword-29M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tanzilidrisi/Foreword-29M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="tanzilidrisi/Foreword-29M")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq processor = AutoProcessor.from_pretrained("tanzilidrisi/Foreword-29M") model = AutoModelForSpeechSeq2Seq.from_pretrained("tanzilidrisi/Foreword-29M", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Foreword 29M
Streaming English speech-to-text for voice agents, in a 17 MB file. Foreword writes most words before the speaker has finished saying them, and it runs on one CPU thread.
- Size: 29.2M parameters, 4-bit weights. The weights file is 16.79 MB; 17.61 MB with the config and tokenizer.
- Base: fine-tuned from Moonshine Tiny (streaming),
moonshine-ai/moonshine-streaming-tiny. - Speed: 12 to 13 ms of computing per 80 ms of audio on one Apple M5 thread.
- Language: English only.
Use
pip install torch "transformers>=5" soundfile huggingface_hub
from foreword import Foreword # foreword.py is in this folder
fw = Foreword.from_pretrained(".") # this folder, or a Hugging Face repo id
print(fw.transcribe("speech.wav")) # 16 kHz mono
stream = fw.stream() # live: feed 16 kHz mono float32 audio
for chunk in mic_chunks: # any chunk size
for u in stream.feed(chunk): # one update per 80 ms of audio
print(u.text, u.words, u.guess)
Each update has text (the transcript so far, including the word being spoken), words (each word
with a confidence), guess (up to two words the model expects next, with confidences) and time
(seconds of audio heard). Earlier words can still be revised by a later update.
From the command line: python foreword.py speech.wav [--live].
Results
All figures were measured for this model with the scripts in the Foreword project.
How early words arrive. Clips are fed in 80 ms steps. A word counts as early when it is right, and never changed afterwards, before the speaker finished it. Word times come from Montreal Forced Aligner.
| Test clips | Words right for good before they end | Median time against the word's end | WER on these clips |
|---|---|---|---|
| 100 LibriSpeech test-clean clips (1,870 words) | 77.5% | 90 ms before | 4.87% |
| 272 NOTSOFAR-1 meeting clips (4,721 words) | 67.8% | 80 ms before | 8.17% |
Accuracy on whole clips, every clip of each set (Whisper-style text normalizer):
| LibriSpeech test-clean | LibriSpeech test-other | AMI test (re-cut) | NOTSOFAR-1 eval |
|---|---|---|---|
| 4.58% | 13.16% | 18.50% | 9.86% |
Open ASR Leaderboard test sets (the leaderboard's text normalizer; the whole clip in one step):
| TED-LIUM | VoxPopuli | LibriSpeech clean | Earnings22 | LibriSpeech other | AMI | GigaSpeech | SPGISpeech | Mean |
|---|---|---|---|---|---|---|---|---|
| 6.77% | 12.30% | 4.50% | 22.42% | 13.09% | 18.08% | 14.07% | 7.79% | 12.38% |
The training parts of LibriSpeech, AMI and VoxPopuli are in the training data, so those test sets are familiar speech. TED-LIUM, Earnings22, GigaSpeech and SPGISpeech are not in the training data.
Against other models
Foreword is fine-tuned from Moonshine Tiny (streaming), so that is the first model to compare it with: like for like, the small file each one ships, and further down the two full-precision checkpoints in the same engine. Two other small speech-to-text models were run on the same clips too: Whistle (17 MB) and Whisper base.en (145 MB).
Streaming, each model as it ships
The same clips, fed in 80 ms steps. Each model runs the way its own project ships it:
- Moonshine Tiny: the
moonshine-voiceruntime 0.1.6 with its quantized model (45 MB), re-decoding on every step. - Whistle:
cactus-needle3.2.10 with its engine 3.3.3 andwhistle.cact(16.9 MB), English forced, in its own live mode (chunks of about 1 s); the text shown is what it has committed plus its unconfirmed tail. - Whisper base.en:
openai-whisper20250625 (the 145 MB checkpoint), re-run on all audio so far every 480 ms; the text shown is its latest output.
| Clips | Model | File | Words right for good before they end | Median time against the word's end | WER on these clips |
|---|---|---|---|---|---|
| 100 LibriSpeech test-clean | Foreword 29M | 17 MB | 77.5% | 90 ms before | 4.87% |
| Moonshine Tiny | 45 MB | 3.3% | 270 ms after | 6.14% | |
| Whistle | 17 MB | 11.3% | 390 ms after | 3.60% | |
| Whisper base.en | 145 MB | 29.8% | 100 ms after | 3.49% | |
| 272 NOTSOFAR-1 meeting | Foreword 29M | 17 MB | 67.8% | 80 ms before | 8.17% |
| Moonshine Tiny | 45 MB | 5.2% | 300 ms after | 11.43% | |
| Whistle | 17 MB | 7.9% | 490 ms after | 15.88% | |
| Whisper base.en | 145 MB | 24.8% | 130 ms after | 14.96% |
Foreword minus each model on the same clips, with 95% intervals:
| Words early, audiobook clips | WER, audiobook clips | Words early, meeting clips | WER, meeting clips | |
|---|---|---|---|---|
| Moonshine Tiny | +74.3 (+71.9 to +76.6) | -1.3 (-2.6 to +0.1) | +62.6 (+60.5 to +64.6) | -3.3 (-4.5 to -2.0) |
| Whistle | +66.2 (+64.0 to +68.4) | +1.3 (-0.1 to +2.5) | +59.8 (+57.7 to +61.8) | -7.7 (-9.7 to -5.8) |
| Whisper base.en | +47.7 (+45.1 to +50.3) | +1.4 (+0.2 to +2.6) | +42.9 (+40.7 to +45.0) | -6.8 (-11.6 to -3.5) |
Foreword is the only one of the four that writes most words before they end. On the audiobook clips Whistle and Whisper base.en make fewer errors than Foreword, by about 1.3 points. On the meeting clips Foreword makes fewer errors than all three; the training part of NOTSOFAR-1 is in Foreword's training data, so that is familiar speech for it. The Open ASR sets below were not run for Whistle or Whisper base.en.
Whole clips against Moonshine Tiny: the eight Open ASR sets
Moonshine Tiny in its own runtime is given the same clip and silence as Foreword and asked for its final text.
| File | TED-LIUM | VoxPopuli | LibriSpeech clean | Earnings22 | LibriSpeech other | AMI | GigaSpeech | SPGISpeech | Mean | |
|---|---|---|---|---|---|---|---|---|---|---|
| Moonshine Tiny, its own runtime | 45 MB | 7.80% | 15.67% | 5.61% | 23.64% | 15.28% | 26.23% | 14.92% | 8.20% | 14.67% |
| Foreword 29M | 17 MB | 6.77% | 12.30% | 4.50% | 22.42% | 13.09% | 18.08% | 14.07% | 7.79% | 12.38% |
Foreword makes fewer errors on all eight sets: 2.29 points on the mean (95% interval 2.15 to 2.43), 0.88 on the four sets that are not in its training data (0.69 to 1.06) and 3.70 on the four whose training parts are (3.50 to 3.91). The runtime returned no text for 3,364 of the 12,643 AMI clips, nearly all of them shorter than a second. Without AMI the difference is 1.45 points on the mean of the other seven sets (1.30 to 1.60).
At full precision, in the same engine: 117 MB against 176 MB
The Foreword checkpoint before its 4-bit stage (the long-full-precision variant, 117 MB) and the
checkpoint moonshine-ai/moonshine-streaming-tiny (176 MB), both through the step-by-step engine
Foreword runs in.
| Clips | Model | File | Words right for good before they end | Median time against the word's end | WER on these clips |
|---|---|---|---|---|---|
| 100 LibriSpeech test-clean | Moonshine Tiny checkpoint | 176 MB | 70.5% | 70 ms before | 4.39% |
| Foreword, full precision | 117 MB | 78.9% | 90 ms before | 3.97% | |
| 272 NOTSOFAR-1 meeting | Moonshine Tiny checkpoint | 176 MB | 46.1% | 20 ms before | 13.65% |
| Foreword, full precision | 117 MB | 68.5% | 80 ms before | 7.93% |
Foreword minus the Moonshine Tiny checkpoint: +8.4 points of words early on the audiobook clips (+6.4 to +10.4) with WER level (-0.4, -1.5 to +0.6), and +22.4 points on the meeting clips (+18.8 to +26.1) with WER 5.7 points lower (-7.8 to -3.7). Most of the earliness on read speech comes from the engine and not from the training: the Moonshine Tiny checkpoint in it is already early on 70.5% of audiobook words. What the training adds is earliness that holds on meeting speech.
Open ASR sets. SPGISpeech was not run for the full-precision Foreword checkpoint, so this is seven sets:
| File | TED-LIUM | VoxPopuli | LibriSpeech clean | Earnings22 | LibriSpeech other | AMI | GigaSpeech | Mean of the seven | |
|---|---|---|---|---|---|---|---|---|---|
| Moonshine Tiny checkpoint | 176 MB | 6.54% | 12.70% | 4.49% | 19.71% | 12.54% | 18.11% | 13.30% | 12.49% |
| Foreword, full precision | 117 MB | 6.38% | 11.40% | 4.15% | 20.93% | 11.74% | 16.57% | 13.22% | 12.06% |
Foreword makes 0.43 points fewer errors on the mean of the seven (0.30 to 0.56). It is ahead on the four sets whose training parts are in its training data, level on TED-LIUM (-0.16, -0.59 to +0.25) and GigaSpeech (-0.07, -0.20 to +0.06), and 1.22 points behind on Earnings22 (+0.68 to +1.69).
Training
The model keeps Moonshine's streaming architecture with the word table cut to 19,007 entries. It was trained on audio cut off partway through a word, with the text so far (finishing the cut-off word) and the next two words as the target. Training ran for 40,000 steps at full precision, then 5,000 steps with the weights held to 4 bits, with meeting speech drawn twice as often in that last stage. Hesitations (uh, um) were left out of the training text.
Training data, 602,343 clips with word times:
| Dataset | Hours | Licence |
|---|---|---|
| LibriSpeech | 960 | CC BY 4.0 |
People's Speech (the CC BY clean subset) |
272 | CC BY (its page lists versions 2.0 to 4.0) |
| VoxPopuli (English) | 176 | CC0; the recordings fall under the European Parliament's legal notice |
| AMI Meeting Corpus | 77 | CC BY 4.0 |
| ICSI Meeting Corpus | 29 | CC BY 4.0 |
| NOTSOFAR-1 (train and dev1) | 16 | CC BY 4.0 |
Licences as stated on each dataset's own page on 2026-11-19.
Limits
- English only, 16 kHz audio.
- Accuracy is lower on speech unlike the training data: 22% WER on earnings calls.
- On read speech two other small models are more accurate: on the 100 audiobook clips Whisper base.en (145 MB) scores 3.49% and Whistle (17 MB) 3.60%, against 4.87% for Foreword.
- The 17 MB file is less accurate on whole clips than Moonshine Tiny's 176 MB full-precision checkpoint: 12.38% against 11.68% on the mean of the eight Open ASR sets, 0.70 points (0.57 to 0.83). The two are level on the four sets whose training parts are in the training data (+0.03, -0.15 to +0.22), and Foreword is 1.37 points behind on the four that are not (+1.18 to +1.55). The 4-bit weights cost about one point.
- A word shown early can change until the model settles on it. Use the confidences, or wait one update, where a wrong early word is costly.
- Training text had no digits, and only part of it had punctuation and capitals.
- Each model was trained once. Differences of a few tenths of a point between runs are noise.
Licence
MIT (see LICENSE). Foreword builds on Moonshine and on other MIT-licensed work; their notices are
in THIRD_PARTY_LICENSES and must stay with every copy.
- Downloads last month
- 22
Model tree for tanzilidrisi/Foreword-29M
Base model
moonshine-ai/moonshine-streaming-tiny

