Toshiki Tomihira commited on
Commit
a1e755c
1 Parent(s): 8ea065b

Update readme

Browse files
Files changed (1) hide show
  1. README.md +24 -12
README.md CHANGED
@@ -15,21 +15,25 @@ widget:
15
 
16
  # Wav2Vec2-Base-960h
17
 
18
- [Facebook's Wav2Vec2](https://ai.facebook.com/blog/wav2vec-20-learning-the-structure-of-speech-from-raw-audio/)
19
-
20
- The base model pretrained and fine-tuned on 960 hours of Librispeech on 16kHz sampled speech audio. When using the model
21
- make sure that your speech input is also sampled at 16Khz.
22
-
23
- [Paper](https://arxiv.org/abs/2006.11477)
24
-
25
- Authors: Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael Auli
26
 
27
- **Abstract**
 
 
28
 
29
- 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.
 
30
 
31
- The original model can be found under https://github.com/pytorch/fairseq/tree/master/examples/wav2vec#wav2vec-20.
 
 
32
 
 
 
 
33
 
34
  # Usage
35
 
@@ -109,4 +113,12 @@ print("WER:", wer(result["text"], result["transcription"]))
109
 
110
  | "clean" | "other" |
111
  |---|---|
112
- | 3.4 | 8.6 |
 
 
 
 
 
 
 
 
 
15
 
16
  # Wav2Vec2-Base-960h
17
 
18
+ This repository is a reimplementation of [official Facebooks wav2vec](https://huggingface.co/facebook/wav2vec2-base-960h).
19
+ There is no description of converting the wav2vec [pretrain model](https://github.com/pytorch/fairseq/tree/master/examples/wav2vec#wav2vec-20) to a pytorch.bin file.
20
+ We are rebuilding pytorch.bin from the pretrain model.
21
+ Here is the conversion method.
 
 
 
 
22
 
23
+ ```bash
24
+ pip install transformers[sentencepiece]
25
+ pip install fairseq -U
26
 
27
+ git clone https://github.com/huggingface/transformers.git
28
+ cp transformers/src/transformers/models/wav2vec2/convert_wav2vec2_original_pytorch_checkpoint_to_pytorch.py .
29
 
30
+ wget https://dl.fbaipublicfiles.com/fairseq/wav2vec/wav2vec_small_960h.pt -O ./finetuning/wav2vec_small_960h.pt
31
+ mkdir dict
32
+ wget https://dl.fbaipublicfiles.com/fairseq/wav2vec/dict.ltr.txt
33
 
34
+ mkdir outputs
35
+ python convert_wav2vec2_original_pytorch_checkpoint_to_pytorch.py --pytorch_dump_folder_path ./outputs --checkpoint_path ./wav2vec_small_960h.pt --dict_path ./dict
36
+ ```
37
 
38
  # Usage
39
 
 
113
 
114
  | "clean" | "other" |
115
  |---|---|
116
+ | 3.4 | 8.6 |
117
+
118
+
119
+ # Reference
120
+
121
+
122
+ [Facebook's Wav2Vec2](https://ai.facebook.com/blog/wav2vec-20-learning-the-structure-of-speech-from-raw-audio/)
123
+ [Facebook's huggingface Wav2Vec2](https://huggingface.co/facebook/wav2vec2-base-960h)
124
+ [Paper](https://arxiv.org/abs/2006.11477)