Edit model card
YAML Metadata Error: "language" with value "multi-lingual" is not valid. It must be an ISO 639-1, 639-2 or 639-3 code (two/three letters), or a special value like "code", "multilingual". If you want to use BCP-47 identifiers, you can specify them in language_bcp47.

Wav2Vec2-Large-XLSR-53 finetuned on multi-lingual Common Voice

This checkpoint leverages the pretrained checkpoint wav2vec2-large-xlsr-53 and is fine-tuned on CommonVoice to recognize phonetic labels in multiple languages.

When using the model make sure that your speech input is sampled at 16kHz. Note that the model outputs a string of phonetic labels. A dictionary mapping phonetic labels to words has to be used to map the phonetic output labels to output words.

Paper: Simple and Effective Zero-shot Cross-lingual Phoneme Recognition

Authors: Qiantong Xu, Alexei Baevski, Michael Auli

Abstract Recent progress in self-training, self-supervised pretraining and unsupervised learning enabled well performing speech recognition systems without any labeled data. However, in many cases there is labeled data available for related languages which is not utilized by these methods. This paper extends previous work on zero-shot cross-lingual transfer learning by fine-tuning a multilingually pretrained wav2vec 2.0 model to transcribe unseen languages. This is done by mapping phonemes of the training languages to the target language using articulatory features. Experiments show that this simple method significantly outperforms prior work which introduced task-specific architectures and used only part of a monolingually pretrained model.

The original model can be found under https://github.com/pytorch/fairseq/tree/master/examples/wav2vec#wav2vec-20.

Usage

To transcribe audio files the model can be used as a standalone acoustic model as follows:

 from transformers import Wav2Vec2Processor, Wav2Vec2ForCTC
 from datasets import load_dataset
 import torch
 
 # load model and processor
 processor = Wav2Vec2Processor.from_pretrained("facebook/wav2vec2-xlsr-53-espeak-cv-ft")
 model = Wav2Vec2ForCTC.from_pretrained("facebook/wav2vec2-xlsr-53-espeak-cv-ft")
     
 # load dummy dataset and read soundfiles
 ds = load_dataset("patrickvonplaten/librispeech_asr_dummy", "clean", split="validation")
 
 # tokenize
 input_values = processor(ds[0]["audio"]["array"], return_tensors="pt").input_values
 
 # retrieve logits
 with torch.no_grad():
   logits = model(input_values).logits
 
 # take argmax and decode
 predicted_ids = torch.argmax(logits, dim=-1)
 transcription = processor.batch_decode(predicted_ids)
 # => should give ['m Ιͺ s t ɚ k w Ιͺ l t ɚ Ιͺ z Γ° Ιͺ ɐ p ɑː s Ι™l l ʌ v Γ° Ι™ m Ιͺ d Ι™l k l Γ¦ s Ιͺ z Γ¦ n d w iː aʊ Ι‘ l Γ¦ d t Ι™ w Ι› l k Ι™ m h Ιͺ z Ι‘ ɑː s p Ι™']
Downloads last month
326,103
Inference API
or

Dataset used to train facebook/wav2vec2-xlsr-53-espeak-cv-ft

Spaces using facebook/wav2vec2-xlsr-53-espeak-cv-ft 19

Collection including facebook/wav2vec2-xlsr-53-espeak-cv-ft