Automatic Speech Recognition
Transformers
PyTorch
Dutch
wav2vec2
mozilla-foundation/common_voice_8_0
mozilla-foundation/common_voice_7_0
robust-speech-event
model_for_talk
hf-asr-leaderboard
Eval Results (legacy)
Instructions to use Iskaj/xlsr300m_cv_8.0_nl with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Iskaj/xlsr300m_cv_8.0_nl with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="Iskaj/xlsr300m_cv_8.0_nl")# Load model directly from transformers import AutoProcessor, AutoModelForCTC processor = AutoProcessor.from_pretrained("Iskaj/xlsr300m_cv_8.0_nl") model = AutoModelForCTC.from_pretrained("Iskaj/xlsr300m_cv_8.0_nl", device_map="auto") - Notebooks
- Google Colab
- Kaggle
xlsr300m_cv_8.0_nl
Evaluation Commands
- To evaluate on
mozilla-foundation/common_voice_8_0with splittest
python eval.py --model_id Iskaj/xlsr300m_cv_8.0_nl --dataset mozilla-foundation/common_voice_8_0 --config nl --split test
- To evaluate on
speech-recognition-community-v2/dev_data
python eval.py --model_id Iskaj/xlsr300m_cv_8.0_nl --dataset speech-recognition-community-v2/dev_data --config nl --split validation --chunk_length_s 5.0 --stride_length_s 1.0
Inference
import torch
from datasets import load_dataset
from transformers import AutoModelForCTC, AutoProcessor
import torchaudio.functional as F
model_id = "Iskaj/xlsr300m_cv_8.0_nl"
sample_iter = iter(load_dataset("mozilla-foundation/common_voice_8_0", "nl", 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)
inputs = processor(resampled_audio, sampling_rate=16_000, return_tensors="pt")
with torch.no_grad():
logits = model(**inputs).logits
predicted_ids = torch.argmax(logits, dim=-1)
transcription = processor.batch_decode(predicted_ids)
transcription[0].lower()
#'het kontine schip lag aangemeert in de aven'
- Downloads last month
- 45
Evaluation results
- Test WER on Common Voice 8 NLself-reported46.940
- Test CER on Common Voice 8 NLself-reported21.650
- Test WER on Robust Speech Event - Dev Dataself-reported???
- Test CER on Robust Speech Event - Dev Dataself-reported???
- Test WER on Robust Speech Event - Test Dataself-reported42.560