flexthink
commited on
Commit
·
6e4ace0
1
Parent(s):
c33d085
Update README
Browse files
README.md
CHANGED
@@ -1,3 +1,118 @@
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
---
|
4 |
+
--
|
5 |
+
language: "en"
|
6 |
+
thumbnail:
|
7 |
+
tags:
|
8 |
+
- speechbrain
|
9 |
+
- tts
|
10 |
+
- mos
|
11 |
+
license: "apache-2.0"
|
12 |
+
datasets:
|
13 |
+
- somos
|
14 |
+
metrics:
|
15 |
+
- Pearson R
|
16 |
+
inference: false
|
17 |
+
---
|
18 |
+
<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>
|
19 |
+
<br/><br/>
|
20 |
+
|
21 |
+
# TTS MOS estimation with WavLM for LJSpeech
|
22 |
+
|
23 |
+
This repository provides all the necessary tools to perform TTS quality evaluation using a WavLM finetuning model. The model
|
24 |
+
attempts to predict the Mean Opinion Score, i.e. averaged human ratings on a scale from 1 to 5.
|
25 |
+
|
26 |
+
The model was trained using the SOMOS dataset from Samsung:
|
27 |
+
https://paperswithcode.com/dataset/somos
|
28 |
+
|
29 |
+
|
30 |
+
For a better experience, we encourage you to learn more about
|
31 |
+
[SpeechBrain](https://speechbrain.github.io). The model performance on SOMOS test set is:
|
32 |
+
|
33 |
+
| Release | Pearson R |
|
34 |
+
|:----------:|:--------------:|
|
35 |
+
| 2023-02-29 | 0.904 |
|
36 |
+
|
37 |
+
|
38 |
+
## Pipeline description
|
39 |
+
|
40 |
+
This system is composed of an WavLM model and a simple forward transformer followed by statistical pooling. The model was trained by first pre-conditioning the model on a simple classifier that attempts to determine whether the rating is above a certain threshold and then fine-tuned on the regression task.
|
41 |
+
|
42 |
+
|
43 |
+
|
44 |
+
## Install SpeechBrain
|
45 |
+
|
46 |
+
First of all, please install the **development** version of SpeechBrain with the following command:
|
47 |
+
|
48 |
+
```
|
49 |
+
pip install git+https://github.com/speechbrain/speechbrain.git@$develop
|
50 |
+
```
|
51 |
+
|
52 |
+
Please notice that we encourage you to read our tutorials and learn more about
|
53 |
+
[SpeechBrain](https://speechbrain.github.io).
|
54 |
+
|
55 |
+
### Perform MOS estimation
|
56 |
+
The `RegressionModelSpeechEvaluator` interface is used as a high-level wrapper for the MOS estimation task
|
57 |
+
|
58 |
+
```python
|
59 |
+
from speechbrain.inference.eval import RegressionModelSpeechEvaluator
|
60 |
+
source = "flexthink/ttseval-wavlm-transformer"
|
61 |
+
eval = RegressionModelSpeechEvaluator.from_hparams(source)
|
62 |
+
|
63 |
+
file_names = [
|
64 |
+
"LJ002-0181_110.wav",
|
65 |
+
"booksent_2012_0005_001.wav",
|
66 |
+
]
|
67 |
+
prediction = eval.evaluate_files(file_names)
|
68 |
+
```
|
69 |
+
|
70 |
+
The prediction is a `SpeechEvaluationResult` named tuple instance where `prediction.score` and
|
71 |
+
`predictions.details["score"]` both indicate the predicted Mean Opinion Score.
|
72 |
+
|
73 |
+
### Inference on GPU
|
74 |
+
To perform inference on the GPU, add `run_opts={"device":"cuda"}` when calling the `from_hparams` method.
|
75 |
+
|
76 |
+
### Training
|
77 |
+
The model was trained with SpeechBrain.
|
78 |
+
|
79 |
+
To train it from scratch follows these steps:
|
80 |
+
1. Clone SpeechBrain:
|
81 |
+
```bash
|
82 |
+
git clone https://github.com/speechbrain/speechbrain/
|
83 |
+
```
|
84 |
+
2. Install it:
|
85 |
+
```
|
86 |
+
cd speechbrain
|
87 |
+
pip install -r requirements.txt
|
88 |
+
pip install -e .
|
89 |
+
```
|
90 |
+
|
91 |
+
3. Run Training:
|
92 |
+
```
|
93 |
+
cd recipes/SOMOS/ttseval
|
94 |
+
python train.py hparams/train.yaml --data_folder=your_data_folder
|
95 |
+
```
|
96 |
+
|
97 |
+
### Limitations
|
98 |
+
The SpeechBrain team does not provide any warranty on the performance achieved by this model when used on other datasets.
|
99 |
+
|
100 |
+
# **Citing SpeechBrain**
|
101 |
+
Please, cite SpeechBrain if you use it for your research or business.
|
102 |
+
|
103 |
+
```bibtex
|
104 |
+
@misc{speechbrain,
|
105 |
+
title={{SpeechBrain}: A General-Purpose Speech Toolkit},
|
106 |
+
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},
|
107 |
+
year={2021},
|
108 |
+
eprint={2106.04624},
|
109 |
+
archivePrefix={arXiv},
|
110 |
+
primaryClass={eess.AS},
|
111 |
+
note={arXiv:2106.04624}
|
112 |
+
}
|
113 |
+
```
|
114 |
+
|
115 |
+
# **About SpeechBrain**
|
116 |
+
- Website: https://speechbrain.github.io/
|
117 |
+
- Code: https://github.com/speechbrain/speechbrain/
|
118 |
+
- HuggingFace: https://huggingface.co/speechbrain/
|