facebook/wav2vec2-base (95 M parameters) fine-tuned with a character-level CTC head for English speech
recognition, from a study of noise-robust ASR with word-level error flagging (Group 9, DS & AI Lab project,
Nov 2026). Noise-augmented model trained on 464 h; also the starting point of the 960 h models.
import torch, soundfile as sf
from transformers import Wav2Vec2Processor, Wav2Vec2ForCTC
repo = "kumargulshan/wav2vec2-base-ls460-noise-aug"
processor = Wav2Vec2Processor.from_pretrained(repo)
model = Wav2Vec2ForCTC.from_pretrained(repo).eval()
audio, sr = sf.read("speech.wav") # mono, 16 kHz (resample first if needed)
inputs = processor(audio, sampling_rate=16000, return_tensors="pt")
with torch.no_grad():
ids = model(inputs.input_values).logits.argmax(-1)
print(processor.batch_decode(ids)[0]) # upper-case letters, apostrophe, spaces
Output vocabulary: the same 32 symbols as facebook/wav2vec2-base-960h (A–Z, apostrophe, | word delimiter).
For the best accuracy, decode the logits with a 4-gram LibriSpeech KenLM via pyctcdecode
(we used alpha 0.8, beta 2.0, beam 50).
| Training | from facebook/wav2vec2-base, LibriSpeech train-clean-100 + train-clean-360 (464 h), 80k steps (≈ 28 epochs), peak lr 1e-4, 5 % warm-up, linear decay, seed 42 |
| Augmentation | 80 % of utterances mixed with noise at SNR 0–20 dB (white, pink, MUSAN noise, MUSAN music), 20 % kept clean |
| Regularisation | SpecAugment-style masking (time p 0.4 / span 10, feature p 0.1 / span 64), LayerDrop 0.1, frozen CNN feature encoder |
| Optimiser | AdamW (β 0.9/0.98, weight decay 0.005), gradient clipping 1.0, bf16, duration-bucketed batches of ≤ 640 s of audio |
| Selection | checkpoint with the lowest mean dev WER (dev-clean + dev-other, clean and noisy): step 80000, dev WER 10.71 % |
| Hardware | 1 × NVIDIA L40S |
LibriSpeech test-clean + test-other (5,559 utterances) under 17 conditions: clean, and white / pink / brown noise and ESC-50 environmental sounds at 0, 5, 10, 15, 20 dB SNR (94,503 utterance-conditions, 182.7 h). Brown noise and ESC-50 were never used in training. Noise was mixed with fixed seeds per utterance, so all models see identical audio.
| WER (%) | greedy | + 4-gram LM |
|---|---|---|
| test-clean | 4.70 | 2.97 |
| test-other | 11.09 | 7.58 |
| all noisy conditions, pooled | – | 9.85 |
| white noise, 0–5 dB | 24.84 | 19.60 |
| pink noise, 0–5 dB | 19.44 | 15.01 |
| brown noise, 0–5 dB (unseen type) | 8.22 | 5.56 |
| ESC-50 sounds, 0–5 dB (unseen type) | 16.66 | 12.66 |
| Model | Description |
|---|---|
| B960_rev | best single model: 960 h, noise + reverb + speed + telephone augmentation |
| B960_rev_s2 | same as B960_rev, seed 7 (ensemble member) |
| B_noisy | Model B: 100 h + noise augmentation |
| B2_lr1e-4 | 100 h + noise augmentation, lr 1e-4 |
| A_clean | Model A: 100 h, clean training baseline |
Apache-2.0, as the base model facebook/wav2vec2-base. Training data: LibriSpeech (CC BY 4.0) and MUSAN.
facebook/wav2vec2-base