Edit model card

Wav2Vec2-Base

Paper

Authors: Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael Auli

Abstract We show for the first time that learning powerful representations from speech audio alone followed by fine-tuning on transcribed speech can outperform the best semi-supervised methods while being conceptually simpler. wav2vec 2.0 masks the speech input in the latent space and solves a contrastive task defined over a quantization of the latent representations which are jointly learned. Experiments using all labeled data of Librispeech achieve 1.8/3.3 WER on the clean/other test sets. When lowering the amount of labeled data to one hour, wav2vec 2.0 outperforms the previous state of the art on the 100 hour subset while using 100 times less labeled data. Using just ten minutes of labeled data and pre-training on 53k hours of unlabeled data still achieves 4.8/8.2 WER. This demonstrates the feasibility of speech recognition with limited amounts of labeled data. The original model can be found under https://github.com/pytorch/fairseq/tree/master/examples/wav2vec#wav2vec-20.

Data

  • Sample rate: 16Khz

  • Total pretrained data: 42H

  • Duration (sec):

    • mean: 5.276451094408402
    • std: 2.2694219711399533
    • max: 12.435937673420312
    • min: 0.0005440165748211712

Convert from FAIRSEQ to HF

  1. Create a config
from transformers import Wav2Vec2Config
config = Wav2Vec2Config.from_pretrained('facebook/wav2vec2-base')
config.save_pretrained('./')
  1. Convert using the script written by HF team
wget convert_wav2vec2_original_pytorch_checkpoint_to_pytorch.py

hf_name="<my-hf-repo-name>"
ckpt="<path-to-pth-checkpoint>"

python ./convert_wav2vec2_original_pytorch_checkpoint_to_pytorch.py \
    --pytorch_dump_folder ${hf_name} \
    --checkpoint_path ${ckpt} \
    --config_path ./config.json \
    --not_finetuned
Downloads last month
7
Inference API
Unable to determine this model’s pipeline type. Check the docs .