---
title: wav2vec2-base-10k-voxpopuli-ft-pl
canonical_url: "https://www.modelscope.cn/models/facebook/wav2vec2-base-10k-voxpopuli-ft-pl"
md_url: "https://www.modelscope.cn/models/facebook/wav2vec2-base-10k-voxpopuli-ft-pl.md"
repository: facebook/wav2vec2-base-10k-voxpopuli-ft-pl
last_updated: 2025-05-20
license: cc-by-nc-4.0
model_type:
  - wav2vec2
architectures:
  - Wav2Vec2ForCTC
library_name:
  - pytorch
  - transformer
frameworks:
  - pytorch
language:
  - pl
downloads: 329
stars: 0
tags:
  - audio
  - automatic-speech-recognition
  - voxpopuli
---

# wav2vec2-base-10k-voxpopuli-ft-pl

> wav2vec2-base-10k-voxpopuli-ft-pl - facebook 在 ModelScope 开源的模型。Wav2Vec2-Base-VoxPopuli-Finetuned

facebook/wav2vec2-base-10k-voxpopuli-ft-pl 是 ModelScope 魔搭社区上的机器学习模型，采用 cc-by-nc-4.0 许可。

- **Repository**: facebook/wav2vec2-base-10k-voxpopuli-ft-pl
- **License**: cc-by-nc-4.0
- **Tags**: audio, automatic-speech-recognition, voxpopuli
- **Downloads**: 329
- **Stars**: 0
- **Last updated**: 2025-05-20

Source: https://www.modelscope.cn/models/facebook/wav2vec2-base-10k-voxpopuli-ft-pl

---

# Wav2Vec2-Base-VoxPopuli-Finetuned

[Facebook's Wav2Vec2](https://ai.facebook.com/blog/wav2vec-20-learning-the-structure-of-speech-from-raw-audio/) base model pretrained on the 10K unlabeled subset of [VoxPopuli corpus](https://arxiv.org/abs/2101.00390) and fine-tuned on the transcribed data in pl (refer to Table 1 of paper for more information).

**Paper**: *[VoxPopuli: A Large-Scale Multilingual Speech Corpus for Representation
Learning, Semi-Supervised Learning and Interpretation](https://arxiv.org/abs/2101.00390)*

**Authors**: *Changhan Wang, Morgane Riviere, Ann Lee, Anne Wu, Chaitanya Talnikar, Daniel Haziza, Mary Williamson, Juan Pino, Emmanuel Dupoux* from *Facebook AI*

See the official website for more information, [here](https://github.com/facebookresearch/voxpopuli/)


# Usage for inference

In the following it is shown how the model can be used in inference on a sample of the [Common Voice dataset](https://commonvoice.mozilla.org/en/datasets)

```python
#!/usr/bin/env python3
from transformers import Wav2Vec2Processor, Wav2Vec2ForCTC
from datasets import load_dataset
import torchaudio
import torch

# resample audio

# load model & processor
model = Wav2Vec2ForCTC.from_pretrained("facebook/wav2vec2-base-10k-voxpopuli-ft-pl")
processor = Wav2Vec2Processor.from_pretrained("facebook/wav2vec2-base-10k-voxpopuli-ft-pl")

# load dataset
ds = load_dataset("common_voice", "pl", split="validation[:1%]")

# common voice does not match target sampling rate
common_voice_sample_rate = 48000
target_sample_rate = 16000

resampler = torchaudio.transforms.Resample(common_voice_sample_rate, target_sample_rate)


# define mapping fn to read in sound file and resample
def map_to_array(batch):
    speech, _ = torchaudio.load(batch["path"])
    speech = resampler(speech)
    batch["speech"] = speech[0]
    return batch


# load all audio files
ds = ds.map(map_to_array)

# run inference on the first 5 data samples
inputs = processor(ds[:5]["speech"], sampling_rate=target_sample_rate, return_tensors="pt", padding=True)

# inference
logits = model(**inputs).logits
predicted_ids = torch.argmax(logits, axis=-1)

print(processor.batch_decode(predicted_ids))
```
