poonehmousavi commited on
Commit
07ead3f
1 Parent(s): 8acb840

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +132 -0
README.md CHANGED
@@ -1,3 +1,135 @@
1
  ---
2
  license: apache-2.0
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
  ---
4
+ ---
5
+ language:
6
+ - hi
7
+ thumbnail: null
8
+ pipeline_tag: automatic-speech-recognition
9
+ tags:
10
+ - whisper
11
+ - pytorch
12
+ - speechbrain
13
+ - Transformer
14
+ - hf-asr-leaderboard
15
+ license: apache-2.0
16
+ datasets:
17
+ - commonvoice
18
+ metrics:
19
+ - wer
20
+ - cer
21
+ model-index:
22
+ - name: asr-whisper-large-v2-commonvoice-ar
23
+ results:
24
+ - task:
25
+ name: Automatic Speech Recognition
26
+ type: automatic-speech-recognition
27
+ dataset:
28
+ name: CommonVoice 10.0 (Hindi)
29
+ type: mozilla-foundation/common_voice_10_0
30
+ config: hi
31
+ split: test
32
+ args:
33
+ language: hi
34
+ metrics:
35
+ - name: Test WER
36
+ type: wer
37
+ value: '15.27'
38
+ ---
39
+
40
+ <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>
41
+ <br/><br/>
42
+
43
+ # whisper large-v2 fine-tuned on CommonVoice Hindi
44
+
45
+ This repository provides all the necessary tools to perform automatic speech
46
+ recognition from an end-to-end whisper model fine-tuned on CommonVoice (Hindi Language) within
47
+ SpeechBrain. For a better experience, we encourage you to learn more about
48
+ [SpeechBrain](https://speechbrain.github.io).
49
+
50
+ The performance of the model is the following:
51
+
52
+ | Release | Test CER | Test WER | GPUs |
53
+ |:-------------:|:--------------:|:--------------:| :--------:|
54
+ | 01-02-23 | 7.00 | 15.27 | 1xV100 16GB |
55
+
56
+ ## Pipeline description
57
+
58
+ This ASR system is composed of whisper encoder-decoder blocks:
59
+ - The pretrained whisper-large-v2 encoder is frozen.
60
+ - The pretrained Whisper tokenizer is used.
61
+ - A pretrained Whisper-large-v2 decoder ([openai/whisper-large-v2](https://huggingface.co/openai/whisper-large-v2)) is finetuned on CommonVoice hi.
62
+ The obtained final acoustic representation is given to the greedy decoder.
63
+
64
+ The system is trained with recordings sampled at 16kHz (single channel).
65
+ The code will automatically normalize your audio (i.e., resampling + mono channel selection) when calling *transcribe_file* if needed.
66
+
67
+ ## Install SpeechBrain
68
+
69
+ First of all, please install tranformers and SpeechBrain with the following command:
70
+
71
+ ```
72
+ pip install speechbrain transformers==4.28.0
73
+ ```
74
+
75
+ Please notice that we encourage you to read our tutorials and learn more about
76
+ [SpeechBrain](https://speechbrain.github.io).
77
+
78
+ ### Transcribing your own audio files (in Hindi)
79
+
80
+ ```python
81
+
82
+ from speechbrain.pretrained import WhisperASR
83
+
84
+ asr_model = WhisperASR.from_hparams(source="speechbrain/asr-whisper-large-v2-commonvoice-hi", savedir="pretrained_models/asr-whisper-large-v2-commonvoice-hi")
85
+ asr_model.transcribe_file("speechbrain/asr-whisper-large-v2-commonvoice-hi/example-hi.mp3")
86
+
87
+
88
+ ```
89
+ ### Inference on GPU
90
+ To perform inference on the GPU, add `run_opts={"device":"cuda"}` when calling the `from_hparams` method.
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/transformer/
109
+ python train_with_whisper.py hparams/train_hi_hf_whisper.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/11PKCsyIE703mmDv6n6n_UnD0bUgMPbg_?usp=share_link).
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
+ #### Referencing SpeechBrain
118
+
119
+ ```
120
+ @misc{SB2021,
121
+ author = {Ravanelli, Mirco and Parcollet, Titouan and Rouhe, Aku and Plantinga, Peter and Rastorgueva, Elena and Lugosch, Loren and Dawalatabad, Nauman and Ju-Chieh, Chou and Heba, Abdel and Grondin, Francois and Aris, William and Liao, Chien-Feng and Cornell, Samuele and Yeh, Sung-Lin and Na, Hwidong and Gao, Yan and Fu, Szu-Wei and Subakan, Cem and De Mori, Renato and Bengio, Yoshua },
122
+ title = {SpeechBrain},
123
+ year = {2021},
124
+ publisher = {GitHub},
125
+ journal = {GitHub repository},
126
+ howpublished = {\\\\url{https://github.com/speechbrain/speechbrain}},
127
+ }
128
+ ```
129
+
130
+ #### About SpeechBrain
131
+ SpeechBrain is an open-source and all-in-one speech toolkit. It is designed to be simple, extremely flexible, and user-friendly. Competitive or state-of-the-art performance is obtained in various domains.
132
+
133
+ Website: https://speechbrain.github.io/
134
+
135
+ GitHub: https://github.com/speechbrain/speechbrain