---
title: "Fine-Tune Wav2Vec2 for English ASR in Hugging Face with 🤗 Transformers"
description: "Wav2Vec2, pretrained with a contrastive masked objective on 50k+ hours of unlabeled speech, can be fine-tuned with CTC on small labeled datasets for end-to-end English ASR without a language model."
url: "https://swe.quest/articles/fine-tune-wav2vec2-for-english-asr-in-hugging-face-with-transformers-3965ec4df26fb19a"
canonical: "https://huggingface.co/blog/fine-tune-wav2vec2-english"
source: "Hugging Face"
published: "2021-03-12"
difficulty: "medium"
kind: "How-to"
reading_minutes: 24
tags: ["speech-audio","model-training","python"]
---

# Fine-Tune Wav2Vec2 for English ASR in Hugging Face with 🤗 Transformers

A post on [Hugging Face](https://swe.quest/sources/hugging-face.md), published 2021-03-12, 24 min read, How-to. Original: [https://huggingface.co/blog/fine-tune-wav2vec2-english](https://huggingface.co/blog/fine-tune-wav2vec2-english)

## Summary

Wav2Vec2, pretrained with a contrastive masked objective on 50k+ hours of unlabeled speech, can be fine-tuned with CTC on small labeled datasets for end-to-end English ASR without a language model. The walkthrough fine-tunes the base checkpoint on the 5-hour Timit corpus using 🤗 Transformers and Datasets. It covers building a character-level CTC vocabulary (lowercasing, stripping punctuation, keeping apostrophes, mapping space to a word delimiter, and adding UNK and PAD/blank tokens), and configuring the feature extractor with a matching 16kHz sampling rate and normalization. It also explains why the base checkpoint works better without an attention mask, and evaluates with WER via jiwer while pushing checkpoints to the Hub.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Speech & audio](https://swe.quest/tags/speech-audio.md) (AI & ML)
- [Model training](https://swe.quest/tags/model-training.md) (AI & ML)
- [Python](https://swe.quest/tags/python.md) (Languages)

## Prerequisites

- PyTorch basics
- Transformer models
- CTC loss basics

## Keywords

Wav2Vec2, Hugging Face Transformers, CTC, Timit, Hugging Face Datasets, jiwer, LibriSpeech

## Related posts

- [Fine-Tune Whisper For Multilingual ASR with 🤗 Transformers](https://swe.quest/articles/fine-tune-whisper-for-multilingual-asr-with-transformers-718acb121632ac73.md): Hugging Face · 2022-11-03 · Medium · 25 min read · Speech & audio, Model training, Python
  Whisper, OpenAI's encoder-decoder ASR model pre-trained on 680,000 hours of labelled audio, can be fine-tuned for a low-resource language with Hugging Face Transformers using only about 8 hours of data.
- [Fine-Tune W2V2-Bert for low-resource ASR with 🤗 Transformers](https://swe.quest/articles/fine-tune-w2v2-bert-for-low-resource-asr-with-transformers-c92730274dccb3a7.md): Hugging Face · 2024-01-19 · Medium · 26 min read · Speech & audio, Model training, Python
  Wav2Vec2-BERT (facebook/w2v-bert-2.0), a 580M-parameter audio model pre-trained on 4.5M hours across 143+ languages, can be fine-tuned with CTC for ASR in low-resource languages using Hugging Face Transformers, demonstrated on ~14h of Mongolian Common Voice 16.0 data.
- [Fine-Tune XLSR-Wav2Vec2 for low-resource ASR with 🤗 Transformers](https://swe.quest/articles/fine-tune-xlsr-wav2vec2-for-low-resource-asr-with-transformers-67aead681013ec16.md): Hugging Face · 2021-11-15 · Medium · 23 min read · Speech & audio, Model training, Python
  XLS-R, the multilingual successor to Wav2Vec2 pre-trained on roughly half a million hours of audio in 128 languages, can be fine-tuned for speech recognition by adding a linear layer on top and training with Connectionist Temporal Classification (CTC).
- [Open ASR Leaderboard: Trends and Insights with New Multilingual & Long-Form Tracks](https://swe.quest/articles/open-asr-leaderboard-trends-and-insights-with-new-multilingual-long-form-tracks-19df9033c60a9656.md): Hugging Face · 2025-11-21 · Easy · 7 min read · Speech & audio, Evaluation, Machine learning
  Across 60+ open and closed ASR models on 11 datasets, Conformer encoders paired with LLM decoders (Canary-Qwen-2.5B, Granite-Speech-3.3-8B, Phi-4-Multimodal) achieve the lowest English word error rates.
- [Speculative Decoding for 2x Faster Whisper Inference](https://swe.quest/articles/speculative-decoding-for-2x-faster-whisper-inference-c8681e4ac958e48b.md): Hugging Face · 2023-12-20 · Medium · 12 min read · Speech & audio, Inference & serving, Performance engineering, Python
  Speculative decoding speeds up Whisper transcription by about 2x while producing mathematically identical outputs.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
