Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,125 @@
|
|
1 |
-
---
|
2 |
-
license: apache-2.0
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
language:
|
4 |
+
- fr
|
5 |
+
metrics:
|
6 |
+
- wer
|
7 |
+
base_model:
|
8 |
+
- LeBenchmark/wav2vec2-FR-7K-large
|
9 |
+
pipeline_tag: automatic-speech-recognition
|
10 |
+
library_name: speechbrain
|
11 |
+
tags:
|
12 |
+
- Transformer
|
13 |
+
- wav2vec2
|
14 |
+
- CTC
|
15 |
+
- inference
|
16 |
+
---
|
17 |
+
|
18 |
+
# asr-wav2vec2-orfeo-fr : LeBenchmark/wav2vec2-FR-7K-large fine-tuned on Orféo dataset
|
19 |
+
|
20 |
+
<!-- Provide a quick summary of what the model is/does. -->
|
21 |
+
|
22 |
+
*asr-wav2vec2-orfeo-fr* is an Automatic Speech Recognition model fine-tuned on Orféo with *LeBenchmark/wav2vec2-FR-7K-large* as the pretrained wav2vec2 model.
|
23 |
+
|
24 |
+
The fine-tuned model achieves the following performance :
|
25 |
+
| Release | Valid WER | Test WER | GPUs | Epochs
|
26 |
+
|:-------------:|:--------------:|:--------------:| :--------:|:--------:|
|
27 |
+
| 2023-09-08 | 23.24 | 23.29 | 4xV100 32GB | 30 |
|
28 |
+
|
29 |
+
## 📝 Model Details
|
30 |
+
|
31 |
+
The ASR system is composed of:
|
32 |
+
- the **Tokenizer** (char) that transforms the input text into a sequence of characters ("cat" into ["c", "a", "t"]) and trained with the train transcriptions (train.tsv).
|
33 |
+
- the **Acoustic model** (wav2vec2.0 + DNN + CTC greedy decode). The pretrained wav2vec 2.0 model [LeBenchmark/wav2vec2-FR-7K-large](https://huggingface.co/LeBenchmark/wav2vec2-FR-7K-large) is combined with two DNN layers and fine-tuned on Orféo.
|
34 |
+
The final acoustic representation is given to the CTC greedy decode.
|
35 |
+
|
36 |
+
We used recordings sampled at 16kHz (single channel).
|
37 |
+
|
38 |
+
## 💻 How to transcribe a file with the model
|
39 |
+
|
40 |
+
### Install and import speechbrain
|
41 |
+
|
42 |
+
```bash
|
43 |
+
pip install speechbrain
|
44 |
+
```
|
45 |
+
|
46 |
+
```python
|
47 |
+
from speechbrain.inference.ASR import EncoderASR
|
48 |
+
```
|
49 |
+
|
50 |
+
### Pipeline
|
51 |
+
|
52 |
+
```python
|
53 |
+
def transcribe(audio, model):
|
54 |
+
return model.transcribe_file(audio).lower()
|
55 |
+
|
56 |
+
|
57 |
+
def save_transcript(transcript, audio, output_file):
|
58 |
+
with open(output_file, 'w', encoding='utf-8') as file:
|
59 |
+
file.write(f"{audio}\t{transcript}\n")
|
60 |
+
|
61 |
+
|
62 |
+
def main():
|
63 |
+
model = EncoderASR.from_hparams("Propicto/asr-wav2vec2-orfeo-fr", savedir="tmp/")
|
64 |
+
transcript = transcribe(audio, model)
|
65 |
+
save_transcript(transcript, audio, "out.txt")
|
66 |
+
```
|
67 |
+
|
68 |
+
## ⚙️ Training Details
|
69 |
+
|
70 |
+
### Training Data
|
71 |
+
|
72 |
+
We use train/validation/test splits with an 80/10/10 distribution, corresponding to:
|
73 |
+
| | Train | Valid | Test |
|
74 |
+
|:-------------:|:-------------:|:--------------:|:--------------:|
|
75 |
+
| # utterances | 231,374 | 28,796 | 29,009 |
|
76 |
+
| # hours | 147.26 | 18.43 | 13.95 |
|
77 |
+
|
78 |
+
### Training Procedure
|
79 |
+
|
80 |
+
We follow the training procedure provided in the [ASR-CTC speechbrain recipe](https://github.com/speechbrain/speechbrain/tree/develop/recipes/CommonVoice/ASR/CTC).
|
81 |
+
|
82 |
+
#### Training Hyperparameters
|
83 |
+
|
84 |
+
Refer to the hyperparams.yaml file to get the hyperparameters' information.
|
85 |
+
|
86 |
+
#### Training time
|
87 |
+
|
88 |
+
With 4xV100 32GB, the training took ~ 22 hours.
|
89 |
+
|
90 |
+
#### Libraries
|
91 |
+
|
92 |
+
[Speechbrain](https://speechbrain.github.io/):
|
93 |
+
```bibtex
|
94 |
+
@misc{SB2021,
|
95 |
+
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 },
|
96 |
+
title = {SpeechBrain},
|
97 |
+
year = {2021},
|
98 |
+
publisher = {GitHub},
|
99 |
+
journal = {GitHub repository},
|
100 |
+
howpublished = {\\\\url{https://github.com/speechbrain/speechbrain}},
|
101 |
+
}
|
102 |
+
```
|
103 |
+
|
104 |
+
## 💡 Information
|
105 |
+
|
106 |
+
- **Developed by:** Cécile Macaire
|
107 |
+
- **Funded by [optional]:** GENCI-IDRIS (Grant 2023-AD011013625R1)
|
108 |
+
PROPICTO ANR-20-CE93-0005
|
109 |
+
- **Language(s) (NLP):** French
|
110 |
+
- **License:** Apache-2.0
|
111 |
+
- **Finetuned from model:** LeBenchmark/wav2vec2-FR-7K-large
|
112 |
+
|
113 |
+
## 📌 Citation
|
114 |
+
|
115 |
+
```bibtex
|
116 |
+
@inproceedings{macaire24_interspeech,
|
117 |
+
title = {Towards Speech-to-Pictograms Translation},
|
118 |
+
author = {Cécile Macaire and Chloé Dion and Didier Schwab and Benjamin Lecouteux and Emmanuelle Esperança-Rodier},
|
119 |
+
year = {2024},
|
120 |
+
booktitle = {Interspeech 2024},
|
121 |
+
pages = {857--861},
|
122 |
+
doi = {10.21437/Interspeech.2024-490},
|
123 |
+
issn = {2958-1796},
|
124 |
+
}
|
125 |
+
```
|