ferugit commited on
Commit
9a8fb03
·
1 Parent(s): ff621e3

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +102 -0
README.md CHANGED
@@ -33,3 +33,105 @@ model-index:
33
  type: wer
34
  value: '7.83'
35
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  type: wer
34
  value: '7.83'
35
  ---
36
+
37
+
38
+
39
+ <iframe src="https://ghbtns.com/github-btn.html?user=speechbrain&repo=speechbrain&type=star&count=true&size=large&v=2" frameborder="0" scrolling="0" width="170" height="30" title="GitHub"></iframe>
40
+ <br/><br/>
41
+
42
+ # wav2vec 2.0 with CTC trained on CommonVoice Spanish (No LM)
43
+
44
+ This repository provides all the necessary tools to perform automatic speech
45
+ recognition from an end-to-end system pretrained on CommonVoice (German Language) within
46
+ SpeechBrain. For a better experience, we encourage you to learn more about
47
+ [SpeechBrain](https://speechbrain.github.io).
48
+
49
+ The performance of the model is the following:
50
+
51
+ | Release | Test CER | Test WER | GPUs |
52
+ |:-------------:|:--------------:|:--------------:| :--------:|
53
+ | 16-08-22 | 2.40 | 9.54 | 1xRTXA6000 48GB |
54
+
55
+ ## Pipeline description
56
+
57
+ This ASR system is composed of 2 different but linked blocks:
58
+ - Tokenizer (char) that transforms words into chars and trained with
59
+ the train transcriptions (train.tsv) of CommonVoice (DE).
60
+ - Acoustic model (wav2vec2.0 + CTC). A pretrained wav2vec 2.0 model ([wav2vec2-large-xlsr-53-german](https://huggingface.co/facebook/wav2vec2-large-xlsr-53-german)) is combined with two DNN layers and finetuned on CommonVoice DE.
61
+ The obtained final acoustic representation is given to the CTC decoder.
62
+
63
+ The system is trained with recordings sampled at 16kHz (single channel).
64
+ The code will automatically normalize your audio (i.e., resampling + mono channel selection) when calling *transcribe_file* if needed.
65
+
66
+ ## Install SpeechBrain
67
+
68
+ First of all, please install tranformers and SpeechBrain with the following command:
69
+
70
+ ```
71
+ pip install speechbrain transformers
72
+ ```
73
+
74
+ Please notice that we encourage you to read our tutorials and learn more about
75
+ [SpeechBrain](https://speechbrain.github.io).
76
+
77
+ ### Transcribing your own audio files (in German)
78
+
79
+ ```python
80
+ from speechbrain.pretrained import EncoderASR
81
+
82
+ asr_model = EncoderASR.from_hparams(source="speechbrain/asr-wav2vec2-commonvoice-de", savedir="pretrained_models/asr-wav2vec2-commonvoice-de")
83
+ asr_model.transcribe_file("speechbrain/asr-wav2vec2-commonvoice-de/example-de.wav")
84
+
85
+ ```
86
+ ### Inference on GPU
87
+ To perform inference on the GPU, add `run_opts={"device":"cuda"}` when calling the `from_hparams` method.
88
+
89
+ ## Parallel Inference on a Batch
90
+ Please, [see this Colab notebook](https://colab.research.google.com/drive/1hX5ZI9S4jHIjahFCZnhwwQmFoGAi3tmu?usp=sharing) to figure out how to transcribe in parallel a batch of input sentences using a pre-trained model.
91
+
92
+ ### Training
93
+ The model was trained with SpeechBrain.
94
+ To train it from scratch follow these steps:
95
+ 1. Clone SpeechBrain:
96
+ ```bash
97
+ git clone https://github.com/speechbrain/speechbrain/
98
+ ```
99
+ 2. Install it:
100
+ ```bash
101
+ cd speechbrain
102
+ pip install -r requirements.txt
103
+ pip install -e .
104
+ ```
105
+
106
+ 3. Run Training:
107
+ ```bash
108
+ cd recipes/CommonVoice/ASR/seq2seq
109
+ python train.py hparams/train_de_with_wav2vec.yaml --data_folder=your_data_folder
110
+ ```
111
+
112
+ You can find our training results (models, logs, etc) [here](https://drive.google.com/drive/folders/19G2Zm8896QSVDqVfs7PS_W86-K0-5xeC?usp=sharing).
113
+
114
+ ### Limitations
115
+ The SpeechBrain team does not provide any warranty on the performance achieved by this model when used on other datasets.
116
+
117
+
118
+ # **About SpeechBrain**
119
+ - Website: https://speechbrain.github.io/
120
+ - Code: https://github.com/speechbrain/speechbrain/
121
+ - HuggingFace: https://huggingface.co/speechbrain/
122
+
123
+
124
+ # **Citing SpeechBrain**
125
+ Please, cite SpeechBrain if you use it for your research or business.
126
+
127
+ ```bibtex
128
+ @misc{speechbrain,
129
+ title={{SpeechBrain}: A General-Purpose Speech Toolkit},
130
+ author={Mirco Ravanelli and Titouan Parcollet and Peter Plantinga and Aku Rouhe and Samuele Cornell and Loren Lugosch and Cem Subakan and Nauman Dawalatabad and Abdelwahab Heba and Jianyuan Zhong and Ju-Chieh Chou and Sung-Lin Yeh and Szu-Wei Fu and Chien-Feng Liao and Elena Rastorgueva and François Grondin and William Aris and Hwidong Na and Yan Gao and Renato De Mori and Yoshua Bengio},
131
+ year={2021},
132
+ eprint={2106.04624},
133
+ archivePrefix={arXiv},
134
+ primaryClass={eess.AS},
135
+ note={arXiv:2106.04624}
136
+ }
137
+ ```