đ Wav2Vec2-Large-Robust finetuned on Librispeech
This model is a fine - tuned version of the wav2vec2 - large - robust model, which can be used for automatic speech recognition. It has been pre - trained on multiple datasets and fine - tuned on Librispeech.
đ Quick Start
This model is a fine - tuned version of the [wav2vec2 - large - robust](https://huggingface.co/facebook/wav2vec2 - large - robust) model. It has been pretrained on several datasets:
- [Libri - Light](https://github.com/facebookresearch/libri - light): open - source audio books from the LibriVox project; clean, read - out audio data
- CommonVoice: crowd - source collected audio data; read - out text snippets
- Switchboard: telephone speech corpus; noisy telephone data
- Fisher: conversational telephone speech; noisy telephone data
And subsequently been finetuned on 960 hours of Librispeech, which is open - source read - out audio data.
When using the model, make sure that your speech input is also sampled at 16Khz.
The related paper is Robust Wav2Vec2.
Authors: Wei - Ning Hsu, Anuroop Sriram, Alexei Baevski, Tatiana Likhomanenko, Qiantong Xu, Vineel Pratap, Jacob Kahn, Ann Lee, Ronan Collobert, Gabriel Synnaeve, Michael Auli
Abstract
Self - supervised learning of speech representations has been a very active research area but most work is focused on a single domain such as read audio books for which there exist large quantities of labeled and unlabeled data. In this paper, we explore more general setups where the domain of the unlabeled data for pre - training data differs from the domain of the labeled data for fine - tuning, which in turn may differ from the test data domain. Our experiments show that using target domain data during pre - training leads to large performance improvements across a variety of setups. On a large - scale competitive setup, we show that pre - training on unlabeled in - domain data reduces the gap between models trained on in - domain and out - of - domain labeled data by 66% - 73%. This has obvious practical implications since it is much easier to obtain unlabeled target domain data than labeled data. Moreover, we find that pre - training on multiple domains improves generalization performance on domains not seen during training. Code and models will be made available at this https URL.
The original model can be found under https://github.com/pytorch/fairseq/tree/master/examples/wav2vec#wav2vec - 20.
⨠Features
- Multi - domain pre - training: Pretrained on various datasets including Libri - Light, CommonVoice, Switchboard, and Fisher, which helps the model handle different types of audio data.
- Fine - tuning on Librispeech: Finetuned on 960 hours of Librispeech data, improving its performance on open - source read - out audio data.
đ Documentation
Datasets
Property |
Details |
Model Type |
Wav2Vec2 - Large - Robust finetuned on Librispeech |
Training Data |
Pretrained on Libri - Light, CommonVoice, Switchboard, Fisher; Finetuned on Librispeech |
Important Note
â ī¸ Important Note
When using the model, make sure that your speech input is also sampled at 16Khz.
đģ Usage Examples
Basic Usage
from transformers import Wav2Vec2Processor, Wav2Vec2ForCTC
from datasets import load_dataset
import soundfile as sf
import torch
processor = Wav2Vec2Processor.from_pretrained("facebook/wav2vec2-large-robust-ft-libri-960h")
model = Wav2Vec2ForCTC.from_pretrained("facebook/wav2vec2-large-robust-ft-libri-960h")
def map_to_array(batch):
speech, _ = sf.read(batch["file"])
batch["speech"] = speech
return batch
ds = load_dataset("patrickvonplaten/librispeech_asr_dummy", "clean", split="validation")
ds = ds.map(map_to_array)
input_values = processor(ds["speech"][:2], return_tensors="pt", padding="longest").input_values
logits = model(input_values).logits
predicted_ids = torch.argmax(logits, dim=-1)
transcription = processor.batch_decode(predicted_ids)
đ License
This model is licensed under the [apache - 2.0](https://www.apache.org/licenses/LICENSE - 2.0) license.