aheba31 commited on
Commit
70b514f
1 Parent(s): 8789192

add readme

Browse files
Files changed (1) hide show
  1. README.md +107 -0
README.md ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: "en"
3
+ thumbnail:
4
+ tags:
5
+ - Spoken language understanding
6
+ - speechbrain
7
+ - wav2vec2
8
+ - hubert
9
+ - pytorch
10
+ license: "apache-2.0"
11
+ datasets:
12
+ - SLURP
13
+ metrics:
14
+ - Accuracy
15
+ ---
16
+
17
+ <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>
18
+ <br/><br/>
19
+
20
+ # End-to-end SLU model for SLIRP
21
+
22
+ This repository provides all the necessary tools to perform Speech to intent and slot label with a fine-tuned hubert encoder + decoder using SpeechBrain (in E2E trend).
23
+ It is trained on [SLUR](https://arxiv.org/abs/2011.13205) training data.
24
+
25
+
26
+ For a better experience, we encourage you to learn more about
27
+ [SpeechBrain](https://speechbrain.github.io). The model performance on SLURP test set is:
28
+
29
+ | Release | SLU-F1(%) |
30
+ |:-------------:|:--------------:|
31
+ | 30-11-21 | 75.10 |
32
+
33
+
34
+ ## Install SpeechBrain
35
+
36
+ First of all, please install the **development** version of SpeechBrain with the following command:
37
+
38
+ ```
39
+ git clone https://github.com/speechbrain/speechbrain.git
40
+ cd speechbrain
41
+ pip install -r requirements.txt
42
+ pip install --editable .
43
+ ```
44
+
45
+ Please notice that we encourage you to read our tutorials and learn more about
46
+ [SpeechBrain](https://speechbrain.github.io).
47
+
48
+ ### Perform SLU E2E decoding
49
+
50
+ An external `py_module_file=custom_interface.py` is used as an external Predictor class into this HF repos. We use `foreign_class` function from `speechbrain.pretrained.interfaces` that allow you to load you custom model.
51
+
52
+ ```python
53
+ >>> from speechbrain.pretrained.interfaces import foreign_class
54
+ >>> slu = foreign_class(source="speechbrain/SLU-direct-SLURP-hubert-enc", pymodule_file="custom_interface.py", classname="CustomSLUDecoder")
55
+ >>> slu.decode_file("speechbrain/SLU-direct-SLURP-hubert-enc/audio-1490356700-headset.flac")
56
+ ```
57
+
58
+ The system is trained with recordings sampled at 16kHz (single channel).
59
+ The code will automatically normalize your audio (i.e., resampling + mono channel selection) when calling *decode_file* if needed. Make sure your input tensor is compliant with the expected sampling rate if you use *decode_batch* and *decode_batch*.
60
+
61
+ ### Inference on GPU
62
+ To perform inference on the GPU, add `run_opts={"device":"cuda"}` when calling the `from_hparams` method.
63
+
64
+ ### Training
65
+ The model was trained with SpeechBrain (aa018540).
66
+ To train it from scratch follows these steps:
67
+ 1. Clone SpeechBrain:
68
+ ```bash
69
+ git clone https://github.com/speechbrain/speechbrain/
70
+ ```
71
+ 2. Install it:
72
+ ```
73
+ cd speechbrain
74
+ pip install -r requirements.txt
75
+ pip install -e .
76
+ ```
77
+
78
+ 3. Run Training:
79
+ ```
80
+ cd recipes/SLURP/direct
81
+ python train_with_wav2vec2.py hparams/train_with_wav2vec2.yaml --data_folder=your_data_folder
82
+ ```
83
+
84
+ You can find our training results (models, logs, etc) [here](https://drive.google.com/drive/folders/1LpcuFldRo_Va1OCGp1bLNdiaC7AQNJOb?usp=sharing)).
85
+
86
+ ### Limitations
87
+ The SpeechBrain team does not provide any warranty on the performance achieved by this model when used on other datasets.
88
+
89
+ # **Citing SpeechBrain**
90
+ Please, cite SpeechBrain if you use it for your research or business.
91
+
92
+ ```bibtex
93
+ @misc{speechbrain,
94
+ title={{SpeechBrain}: A General-Purpose Speech Toolkit},
95
+ 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},
96
+ year={2021},
97
+ eprint={2106.04624},
98
+ archivePrefix={arXiv},
99
+ primaryClass={eess.AS},
100
+ note={arXiv:2106.04624}
101
+ }
102
+ ```
103
+
104
+ # **About SpeechBrain**
105
+ - Website: https://speechbrain.github.io/
106
+ - Code: https://github.com/speechbrain/speechbrain/
107
+ - HuggingFace: https://huggingface.co/speechbrain/