Downloads · 30 days
17
3% of all-time downloads
anuragshas/wav2vec2-large-xls-r-300m-as
wav2vec2-large-xls-r-300m-as is a automatic speech recognition model from anuragshas. Use it when you need speech turned into text. It is set up for transformers. The card lists the license as apache-2.0.
should probably proofread and complete it, then remove this comment. --
Downloads · 30 days
17
3% of all-time downloads
All-time downloads
567
Public
Repo size
5.7 GB
Likes
0
Public
Click a slice to open those files.
.bin3.1 GB · 99%
From the Hugging Face model README
This model is a fine-tuned version of facebook/wav2vec2-xls-r-300m on the common_voice dataset. It achieves the following results on the evaluation set:
More information needed
More information needed
More information needed
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Wer |
|---|---|---|---|---|
| 5.7027 | 21.05 | 400 | 3.4157 | 1.0 |
| 1.1638 | 42.1 | 800 | 1.3498 | 0.7461 |
| 0.2266 | 63.15 | 1200 | 1.6147 | 0.7273 |
| 0.1473 | 84.21 | 1600 | 1.6649 | 0.7108 |
| 0.1043 | 105.26 | 2000 | 1.7691 | 0.7090 |
| 0.0779 | 126.31 | 2400 | 1.8300 | 0.7009 |
| 0.0613 | 147.36 | 2800 | 1.8681 | 0.6916 |
| 0.0471 | 168.41 | 3200 | 1.8567 | 0.6875 |
| 0.0343 | 189.46 | 3600 | 1.9054 | 0.6840 |
| 0.0265 | 210.51 | 4000 | 1.9020 | 0.6786 |
| 0.0219 | 231.56 | 4400 | 1.9068 | 0.6679 |
mozilla-foundation/common_voice_7_0 with split testpython eval.py --model_id anuragshas/wav2vec2-large-xls-r-300m-as --dataset mozilla-foundation/common_voice_7_0 --config as --split test
import torch
from datasets import load_dataset
from transformers import AutoModelForCTC, AutoProcessor
import torchaudio.functional as F
model_id = "anuragshas/wav2vec2-large-xls-r-300m-as"
sample_iter = iter(load_dataset("mozilla-foundation/common_voice_7_0", "as", split="test", streaming=True, use_auth_token=True))
sample = next(sample_iter)
resampled_audio = F.resample(torch.tensor(sample["audio"]["array"]), 48_000, 16_000).numpy()
model = AutoModelForCTC.from_pretrained(model_id)
processor = AutoProcessor.from_pretrained(model_id)
input_values = processor(resampled_audio, return_tensors="pt").input_values
with torch.no_grad():
logits = model(input_values).logits
transcription = processor.batch_decode(logits.numpy()).text
# => "জাহাজত তো তিশকুৰলৈ যাব কিন্তু জহাজিটো আহিপনে"
| Without LM | With LM (run ./eval.py) |
|---|---|
| 67 | 56.995 |