sangeet2020 commited on
Commit
cb4cffd
1 Parent(s): 4eced64

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +130 -0
README.md CHANGED
@@ -1,3 +1,133 @@
1
  ---
 
 
 
 
 
 
 
 
 
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - de
4
+ thumbnail: null
5
+ pipeline_tag: automatic-speech-recognition
6
+ tags:
7
+ - CTC
8
+ - pytorch
9
+ - speechbrain
10
+ - Transformer
11
  license: apache-2.0
12
+ datasets:
13
+ - commonvoice
14
+ metrics:
15
+ - wer
16
+ - cer
17
+ model-index:
18
+ - name: asr-wav2vec2-commonvoice-de
19
+ results:
20
+ - task:
21
+ name: Automatic Speech Recognition
22
+ type: automatic-speech-recognition
23
+ dataset:
24
+ name: CommonVoice Corpus 10.0/ (German)
25
+ type: mozilla-foundation/common_voice_10_1
26
+ config: de
27
+ split: test
28
+ args:
29
+ language: de
30
+ metrics:
31
+ - name: Test WER
32
+ type: wer
33
+ value: '9.54'
34
  ---
35
+
36
+ <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>
37
+ <br/><br/>
38
+
39
+ # WavLM-large with CTC trained on CommonVoice German (No LM)
40
+
41
+ This repository provides all the necessary tools to perform automatic speech
42
+ recognition from an end-to-end system pretrained on CommonVoice (German Language) within
43
+ SpeechBrain. For a better experience, we encourage you to learn more about
44
+ [SpeechBrain](https://speechbrain.github.io).
45
+
46
+ The performance of the model is the following:
47
+
48
+ | Release | Test CER | Test WER | GPUs |
49
+ |:-------------:|:--------------:|:--------------:| :--------:|
50
+ | 16-08-22 | 2.24 | 8.98 | 1xRTXA6000 48GB |
51
+
52
+ ## Pipeline description
53
+
54
+ This ASR system is composed of 2 different but linked blocks:
55
+ - Tokenizer (char) that transforms words into chars and trained with
56
+ the train transcriptions (train.tsv) of CommonVoice (DE).
57
+ - Acoustic model (wavlm + CTC). A pretrained wav2vec 2.0 model ([microsoft/wavlm-large](https://huggingface.co/microsoft/wavlm-large)) is combined with two DNN layers and finetuned on CommonVoice DE.
58
+ The obtained final acoustic representation is given to the CTC decoder.
59
+
60
+ The system is trained with recordings sampled at 16kHz (single channel).
61
+ The code will automatically normalize your audio (i.e., resampling + mono channel selection) when calling *transcribe_file* if needed.
62
+
63
+ ## Install SpeechBrain
64
+
65
+ First of all, please install tranformers and SpeechBrain with the following command:
66
+
67
+ ```
68
+ pip install speechbrain transformers
69
+ ```
70
+
71
+ Please notice that we encourage you to read our tutorials and learn more about
72
+ [SpeechBrain](https://speechbrain.github.io).
73
+
74
+ ### Transcribing your own audio files (in German)
75
+
76
+ ```python
77
+ from speechbrain.pretrained import EncoderASR
78
+
79
+ asr_model = EncoderASR.from_hparams(source="sangeet2020/asr-wavlm-large-commonvoice-de", savedir="pretrained_models/asr-wavlm-large-commonvoice-de")
80
+ asr_model.transcribe_file("sangeet2020/asr-wavlm-large-commonvoice-de/example-de.wav")
81
+
82
+ ```
83
+ ### Inference on GPU
84
+ To perform inference on the GPU, add `run_opts={"device":"cuda"}` when calling the `from_hparams` method.
85
+
86
+ ## Parallel Inference on a Batch
87
+ 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.
88
+
89
+ ### Training
90
+ The model was trained with SpeechBrain.
91
+ To train it from scratch follow these steps:
92
+ 1. Clone SpeechBrain:
93
+ ```bash
94
+ git clone https://github.com/speechbrain/speechbrain/
95
+ ```
96
+ 2. Install it:
97
+ ```bash
98
+ cd speechbrain
99
+ pip install -r requirements.txt
100
+ pip install -e .
101
+ ```
102
+
103
+ 3. Run Training:
104
+ ```bash
105
+ cd recipes/CommonVoice/ASR/seq2seq
106
+ python train.py hparams/train_de_with_wav2vec.yaml --data_folder=your_data_folder
107
+ ```
108
+
109
+
110
+ ### Limitations
111
+ The SpeechBrain team does not provide any warranty on the performance achieved by this model when used on other datasets.
112
+
113
+
114
+ # **About SpeechBrain**
115
+ - Website: https://speechbrain.github.io/
116
+ - Code: https://github.com/speechbrain/speechbrain/
117
+ - HuggingFace: https://huggingface.co/speechbrain/
118
+
119
+
120
+ # **Citing SpeechBrain**
121
+ Please, cite SpeechBrain if you use it for your research or business.
122
+
123
+ ```bibtex
124
+ @misc{speechbrain,
125
+ title={{SpeechBrain}: A General-Purpose Speech Toolkit},
126
+ 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},
127
+ year={2021},
128
+ eprint={2106.04624},
129
+ archivePrefix={arXiv},
130
+ primaryClass={eess.AS},
131
+ note={arXiv:2106.04624}
132
+ }
133
+ ```