Automatic Speech Recognition
Transformers
Safetensors
English
wav2vec2
ctc
asr
english
common_voice
cased
punctuation
Instructions to use takehika/wav2vec2-commonvoice-full-cased-ctc with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use takehika/wav2vec2-commonvoice-full-cased-ctc with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="takehika/wav2vec2-commonvoice-full-cased-ctc")# Load model directly from transformers import AutoProcessor, AutoModelForCTC processor = AutoProcessor.from_pretrained("takehika/wav2vec2-commonvoice-full-cased-ctc") model = AutoModelForCTC.from_pretrained("takehika/wav2vec2-commonvoice-full-cased-ctc", device_map="auto") - Notebooks
- Google Colab
- Kaggle
wav2vec2-commonvoice-full-cased-ctc
English ASR model based on facebook/wav2vec2-large-xlsr-53.
- Task: Automatic Speech Recognition (CTC)
- Language: English
- License: apache-2.0
- Base model:
facebook/wav2vec2-large-xlsr-53 - Dataset: Common Voice Scripted Speech 25.0 - English
- This model can output uppercase/lowercase letters, selected punctuation, and digits.
Usage
import torch
import librosa
from transformers import AutoModelForCTC, Wav2Vec2Processor
repo_id = "takehika/wav2vec2-commonvoice-full-cased-ctc"
processor = Wav2Vec2Processor.from_pretrained(repo_id)
model = AutoModelForCTC.from_pretrained(repo_id)
speech, _ = librosa.load("sample.wav", sr=16_000)
inputs = processor(speech, sampling_rate=16_000, return_tensors="pt", padding=True)
with torch.no_grad():
logits = model(**inputs).logits
pred_ids = torch.argmax(logits, dim=-1)
text = processor.batch_decode(pred_ids)[0]
print(text)
Data
Text preprocessing was designed to keep casing and punctuation from the original transcripts:
- Unicode NFKC normalization and whitespace cleanup
- Normalize curly quotes, dashes, and ellipsis to ASCII forms
- Preserve uppercase and lowercase letters
- Preserve selected punctuation:
. , ? ! ; : ' " ( ) - / & - Support digits
0-9in the vocabulary - Remove characters outside the supported vocabulary
Tokenizer/vocab behavior:
- Character-level CTC vocabulary
- Space is mapped to
| - Vocabulary size: 78 entries
- Includes
[PAD]and[UNK]
Evaluation
Evaluation uses two WER metrics:
- Strict WER: computes WER on the original prediction and reference text without normalization, so casing, punctuation, symbols, and word segmentation can affect the score.
- Normalized WER: lowercases predictions and references, removes all characters except English letters and spaces, normalizes whitespace, and then computes WER.
Strict WER is the main score because this model is designed to output casing and punctuation. Normalized WER shows word recognition accuracy after removing formatting differences.
| Dataset | Samples | Strict WER | Normalized WER |
|---|---|---|---|
| Common Voice test | 16,396 | 23.67% | 19.67% |
| LibriSpeech test-clean | 2,620 | 98.81% | 6.52% |
| LibriSpeech test-other | 2,939 | 98.79% | 11.17% |
| TED-LIUM | 1,155 | 29.05% | 15.40% |
| AMI | 12,643 | 47.09% | 41.27% |
| Earnings22 | 2,741 | 42.21% | 35.97% |
| VoxPopuli | 1,842 | 26.98% | 18.35% |
Note: LibriSpeech uses uppercase reference transcripts, while this model outputs cased and punctuated text. This makes Strict WER look artificially high on LibriSpeech, so Normalized WER is the more meaningful score for that dataset.
Transcription Examples
Common Voice test
| Reference | Prediction |
|---|---|
| In this second trip he studied some local Chinese martial arts. | In this second trip he studied some local Chinese martial arts. |
| The Greens fielded fifteen candidates, none of whom were elected. | The Greens fielded fifteen candidates, none of whom were elected. |
| The tomato sauce was great. | An tomato sauces qree. |
VoxPopuli
| Reference | Prediction |
|---|---|
| the entire european union and the un must establish and assert that the present situation can no longer be tolerated as an obstacle to our | The entire European Union and the un must establish and assert that the present situation can no longer be tolerated asn obstacle to our. |
| the sources of the reforms that we would hope to introduce to our rules of procedure come in part from the work of the reform working group established by the conference of presidents ably chaired by my colleague dagmar roth behrendt who made a number of proposals that were approved by the conference of presidents and have been forwarded to us to translate as best we can into the rules of procedure. | The sources of the reforms that we would hope to introduce to our rules of procedure come in part from the work of the reform working group established by the conference of presidents ably chaired by my colleague DagmarotBerent and who made a number of proposals that were approved by the Conference of Presidents and have been forwarded to us to translate as best we can into the rules of procedure. |
| in fact the japanese government itself has rejected imports of norwegian whale meat after tests revealed pesticide levels double the amount japan permits in imports making the meat unfit for human consumption so that it simply has to be destroyed. | In fact, the Japanese government itself has rejected imports of Norwegian wellmeat after tests revealed that pesticide levels double the amount Japan permits on imports was found and that's making it unfit for human consumption of that mead simply has to be destroyed. |
Intended Use and Limitations
- Intended use: English ASR for 16 kHz speech close to read/clean speech conditions.
- Performance may degrade on noisy speech, overlapping speakers, strong accents, telephone audio, meeting audio, earnings calls, or other domains far from the training data.
- The model can output casing and punctuation, but capitalization, punctuation, and spacing may be inconsistent.
- Outputs may contain transcription errors. Human review is recommended for high-stakes use.
Attribution
- Base model:
facebook/wav2vec2-large-xlsr-53- Apache-2.0 - Dateset: Common Voice Scripted Speech 25.0 - English - CC0-1.0
License
This model is licensed under Apache-2.0.
- Downloads last month
- 8
Model tree for takehika/wav2vec2-commonvoice-full-cased-ctc
Base model
facebook/wav2vec2-large-xlsr-53