jvision commited on
Commit
277d850
1 Parent(s): 54ec524

first commit

Browse files
.gitattributes CHANGED
@@ -32,3 +32,7 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
32
  *.zip filter=lfs diff=lfs merge=lfs -text
33
  *.zst filter=lfs diff=lfs merge=lfs -text
34
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
32
  *.zip filter=lfs diff=lfs merge=lfs -text
33
  *.zst filter=lfs diff=lfs merge=lfs -text
34
  *tfevents* filter=lfs diff=lfs merge=lfs -text
35
+ checkpoint_85000.pth filter=lfs diff=lfs merge=lfs -text
36
+ supplemental/speakers-combined.pth filter=lfs diff=lfs merge=lfs -text
37
+ supplemental/speakers-dataset.pth filter=lfs diff=lfs merge=lfs -text
38
+ supplemental/model_se.pth.tar filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,3 +1,38 @@
1
  ---
2
  license: cc-by-4.0
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: cc-by-4.0
3
+ language:
4
+ - en
5
+ pipeline_tag: text-to-speech
6
+ tags:
7
+ - tts
8
+ - audio
9
+ - text to speech
10
+ - text-to-speech
11
+ - coqui
12
+ - coqui-tts
13
  ---
14
+ <p>VCTK_p237: 22 year old male, Scottish accent (Fife)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p237.wav" type="audio/wav"></audio> </p>
15
+ <p>VCTK_p241: 21 year old male, Scottish accent (Perth)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p241.wav" type="audio/wav"></audio> </p>
16
+ <p>VCTK_p245: 25 year old male, Irish accent (Dublin)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p245.wav" type="audio/wav"></audio> </p>
17
+ <p>VCTK_p246: 22 year old male, Scottish accent (Selkirk)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p246.wav" type="audio/wav"></audio> </p>
18
+ <p>VCTK_p247: 22 year old male, Scottish accent (Argyll)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p247.wav" type="audio/wav"></audio> </p>
19
+ <p>VCTK_p252: 22 year old male, Scottish accent (Edinburgh)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p252.wav" type="audio/wav"></audio> </p>
20
+ <p>VCTK_p255: 19 year old male, Scottish accent (Galloway)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p255.wav" type="audio/wav"></audio> </p>
21
+ <p>VCTK_p260: 21 year old male, Scottish accent (Orkney)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p260.wav" type="audio/wav"></audio> </p>
22
+ <p>VCTK_p263: 22 year old male, Scottish accent (Aberdeen)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p263.wav" type="audio/wav"></audio> </p>
23
+ <p>VCTK_p271: 19 year old male, Scottish accent (Fife)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p271.wav" type="audio/wav"></audio> </p>
24
+ <p>VCTK_p272: 23 year old male, Scottish accent (Edinburgh)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p272.wav" type="audio/wav"></audio> </p>
25
+ <p>VCTK_p275: 23 year old male, Scottish accent (Midlothian)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p275.wav" type="audio/wav"></audio> </p>
26
+ <p>VCTK_p281: 29 year old male, Scottish accent (Edinburgh)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p281.wav" type="audio/wav"></audio> </p>
27
+ <p>VCTK_p284: 20 year old male, Scottish accent (Fife)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p284.wav" type="audio/wav"></audio> </p>
28
+ <p>VCTK_p285: 21 year old male, Scottish accent (Edinburgh)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p285.wav" type="audio/wav"></audio> </p>
29
+ <p>VCTK_p292: 23 year old male, NorthernIrish accent (Belfast)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p292.wav" type="audio/wav"></audio> </p>
30
+ <p>VCTK_p298: 19 year old male, Irish accent (Tipperary)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p298.wav" type="audio/wav"></audio> </p>
31
+ <p>VCTK_p304: 22 year old male, NorthernIrish accent (Belfast)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p304.wav" type="audio/wav"></audio> </p>
32
+ <p>VCTK_p326: 26 year old male, Australian English accent (Sydney)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p326.wav" type="audio/wav"></audio> </p>
33
+ <p>VCTK_p364: 23 year old male, Irish accent (Donegal)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p364.wav" type="audio/wav"></audio> </p>
34
+ <p>VCTK_p374: 28 year old male, Australian English accent (The Outback)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p374.wav" type="audio/wav"></audio> </p>
35
+
36
+ Built with [YourTTS](https://github.com/Edresson/YourTTS)
37
+
38
+ Dataset: https://datashare.ed.ac.uk/handle/10283/2950
checkpoint_85000.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9a35efbe123ea3f06a4309417c93edfae5adae29090c7c6048522e149351a79e
3
+ size 1043207181
config.json ADDED
@@ -0,0 +1,273 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "logger_uri": null,
3
+ "run_name": "VCTK_European_English_Males",
4
+ "project_name": "YourTTS",
5
+ "run_description": "\n - European Males based on VCTK dataset\n ",
6
+ "print_step": 50,
7
+ "plot_step": 100,
8
+ "model_param_stats": false,
9
+ "wandb_entity": null,
10
+ "dashboard_logger": "tensorboard",
11
+ "save_on_interrupt": true,
12
+ "log_model_step": 1000,
13
+ "save_step": 5000,
14
+ "save_n_checkpoints": 2,
15
+ "save_checkpoints": true,
16
+ "save_all_best": false,
17
+ "save_best_after": 10000,
18
+ "target_loss": "loss_1",
19
+ "print_eval": false,
20
+ "test_delay_epochs": 0,
21
+ "run_eval": true,
22
+ "run_eval_steps": null,
23
+ "distributed_backend": "nccl",
24
+ "distributed_url": "tcp://localhost:54321",
25
+ "mixed_precision": true,
26
+ "epochs": 1000,
27
+ "batch_size": 16,
28
+ "eval_batch_size": 16,
29
+ "grad_clip": [
30
+ 1000.0,
31
+ 1000.0
32
+ ],
33
+ "scheduler_after_epoch": true,
34
+ "lr": 0.001,
35
+ "optimizer": "AdamW",
36
+ "optimizer_params": {
37
+ "betas": [
38
+ 0.8,
39
+ 0.99
40
+ ],
41
+ "eps": 1e-09,
42
+ "weight_decay": 0.01
43
+ },
44
+ "lr_scheduler": null,
45
+ "lr_scheduler_params": {},
46
+ "use_grad_scaler": false,
47
+ "cudnn_enable": true,
48
+ "cudnn_deterministic": false,
49
+ "cudnn_benchmark": false,
50
+ "training_seed": 54321,
51
+ "model": "vits",
52
+ "num_loader_workers": 8,
53
+ "num_eval_loader_workers": 0,
54
+ "use_noise_augment": false,
55
+ "audio": {
56
+ "fft_size": 1024,
57
+ "sample_rate": 16000,
58
+ "win_length": 1024,
59
+ "hop_length": 256,
60
+ "num_mels": 80,
61
+ "mel_fmin": 0,
62
+ "mel_fmax": null
63
+ },
64
+ "use_phonemes": false,
65
+ "phonemizer": "espeak",
66
+ "phoneme_language": "en-us",
67
+ "compute_input_seq_cache": true,
68
+ "text_cleaner": "multilingual_cleaners",
69
+ "enable_eos_bos_chars": false,
70
+ "test_sentences_file": "",
71
+ "phoneme_cache_path": "projects/art/phoneme_cache",
72
+ "characters": {
73
+ "characters_class": "TTS.tts.models.vits.VitsCharacters",
74
+ "vocab_dict": null,
75
+ "pad": "_",
76
+ "eos": "&",
77
+ "bos": "*",
78
+ "blank": null,
79
+ "characters": "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\u00af\u00b7\u00df\u00e0\u00e1\u00e2\u00e3\u00e4\u00e6\u00e7\u00e8\u00e9\u00ea\u00eb\u00ec\u00ed\u00ee\u00ef\u00f1\u00f2\u00f3\u00f4\u00f5\u00f6\u00f9\u00fa\u00fb\u00fc\u00ff\u0101\u0105\u0107\u0113\u0119\u011b\u012b\u0131\u0142\u0144\u014d\u0151\u0153\u015b\u016b\u0171\u017a\u017c\u01ce\u01d0\u01d2\u01d4\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044f\u0451\u0454\u0456\u0457\u0491\u2013!'(),-.:;? ",
80
+ "punctuations": "!'(),-.:;? ",
81
+ "phonemes": "iy\u0268\u0289\u026fu\u026a\u028f\u028ae\u00f8\u0258\u0259\u0275\u0264o\u025b\u0153\u025c\u025e\u028c\u0254\u00e6\u0250a\u0276\u0251\u0252\u1d7b\u0298\u0253\u01c0\u0257\u01c3\u0284\u01c2\u0260\u01c1\u029bpbtd\u0288\u0256c\u025fk\u0261q\u0262\u0294\u0274\u014b\u0272\u0273n\u0271m\u0299r\u0280\u2c71\u027e\u027d\u0278\u03b2fv\u03b8\u00f0sz\u0283\u0292\u0282\u0290\u00e7\u029dx\u0263\u03c7\u0281\u0127\u0295h\u0266\u026c\u026e\u028b\u0279\u027bj\u0270l\u026d\u028e\u029f\u02c8\u02cc\u02d0\u02d1\u028dw\u0265\u029c\u02a2\u02a1\u0255\u0291\u027a\u0267\u025a\u02de\u026b'\u0303' ",
82
+ "is_unique": true,
83
+ "is_sorted": true
84
+ },
85
+ "add_blank": true,
86
+ "batch_group_size": 48,
87
+ "loss_masking": null,
88
+ "min_audio_len": 1,
89
+ "max_audio_len": 160000,
90
+ "min_text_len": 1,
91
+ "max_text_len": Infinity,
92
+ "compute_f0": false,
93
+ "compute_energy": false,
94
+ "compute_linear_spec": true,
95
+ "precompute_num_workers": 12,
96
+ "start_by_longest": true,
97
+ "shuffle": false,
98
+ "drop_last": false,
99
+ "datasets": [
100
+ {
101
+ "formatter": "vctk",
102
+ "language": "en"
103
+ }
104
+ ],
105
+ "test_sentences": [
106
+ [
107
+ "This is an example of a sentence to be synthesized.",
108
+ "VCTK_p237",
109
+ null,
110
+ "en"
111
+ ],
112
+ [
113
+ "This is an example of a sentence to be synthesized.",
114
+ "VCTK_p241",
115
+ null,
116
+ "en"
117
+ ],
118
+ [
119
+ "This is an example of a sentence to be synthesized.",
120
+ "VCTK_p292",
121
+ null,
122
+ "en"
123
+ ],
124
+ [
125
+ "This is an example of a sentence to be synthesized.",
126
+ "VCTK_p304",
127
+ null,
128
+ "en"
129
+ ]
130
+ ],
131
+ "eval_split_max_size": 256,
132
+ "eval_split_size": 0.01,
133
+ "use_speaker_weighted_sampler": false,
134
+ "speaker_weighted_sampler_alpha": 1.0,
135
+ "use_language_weighted_sampler": false,
136
+ "language_weighted_sampler_alpha": 1.0,
137
+ "use_length_weighted_sampler": false,
138
+ "length_weighted_sampler_alpha": 1.0,
139
+ "model_args": {
140
+ "num_chars": 284,
141
+ "out_channels": 513,
142
+ "spec_segment_size": 32,
143
+ "hidden_channels": 192,
144
+ "hidden_channels_ffn_text_encoder": 768,
145
+ "num_heads_text_encoder": 2,
146
+ "num_layers_text_encoder": 10,
147
+ "kernel_size_text_encoder": 3,
148
+ "dropout_p_text_encoder": 0.1,
149
+ "dropout_p_duration_predictor": 0.5,
150
+ "kernel_size_posterior_encoder": 5,
151
+ "dilation_rate_posterior_encoder": 1,
152
+ "num_layers_posterior_encoder": 16,
153
+ "kernel_size_flow": 5,
154
+ "dilation_rate_flow": 1,
155
+ "num_layers_flow": 4,
156
+ "resblock_type_decoder": "2",
157
+ "resblock_kernel_sizes_decoder": [
158
+ 3,
159
+ 7,
160
+ 11
161
+ ],
162
+ "resblock_dilation_sizes_decoder": [
163
+ [
164
+ 1,
165
+ 3,
166
+ 5
167
+ ],
168
+ [
169
+ 1,
170
+ 3,
171
+ 5
172
+ ],
173
+ [
174
+ 1,
175
+ 3,
176
+ 5
177
+ ]
178
+ ],
179
+ "upsample_rates_decoder": [
180
+ 8,
181
+ 8,
182
+ 2,
183
+ 2
184
+ ],
185
+ "upsample_initial_channel_decoder": 512,
186
+ "upsample_kernel_sizes_decoder": [
187
+ 16,
188
+ 16,
189
+ 4,
190
+ 4
191
+ ],
192
+ "periods_multi_period_discriminator": [
193
+ 2,
194
+ 3,
195
+ 5,
196
+ 7,
197
+ 11
198
+ ],
199
+ "use_sdp": true,
200
+ "noise_scale": 1.0,
201
+ "inference_noise_scale": 0.667,
202
+ "length_scale": 1.0,
203
+ "noise_scale_dp": 1.0,
204
+ "inference_noise_scale_dp": 1.0,
205
+ "max_inference_len": null,
206
+ "init_discriminator": true,
207
+ "use_spectral_norm_disriminator": false,
208
+ "use_speaker_embedding": false,
209
+ "num_speakers": 27,
210
+ "speakers_file": "supplemental/speakers.pth",
211
+ "d_vector_file": [
212
+ "supplemental/speakers-base.json",
213
+ "supplemental/speakers-dataset.pth"
214
+ ],
215
+ "speaker_embedding_channels": 256,
216
+ "use_d_vector_file": true,
217
+ "d_vector_dim": 512,
218
+ "detach_dp_input": true,
219
+ "use_language_embedding": true,
220
+ "embedded_language_dim": 4,
221
+ "num_languages": 3,
222
+ "language_ids_file": "supplemental/language_ids.json",
223
+ "use_speaker_encoder_as_loss": true,
224
+ "speaker_encoder_config_path": "supplemental/config_se.json",
225
+ "speaker_encoder_model_path": "supplemental/model_se.pth.tar",
226
+ "condition_dp_on_speaker": true,
227
+ "freeze_encoder": false,
228
+ "freeze_DP": false,
229
+ "freeze_PE": false,
230
+ "freeze_flow_decoder": false,
231
+ "freeze_waveform_decoder": false,
232
+ "encoder_sample_rate": null,
233
+ "interpolate_z": true,
234
+ "reinit_DP": false,
235
+ "reinit_text_encoder": false
236
+ },
237
+ "lr_gen": 0.0002,
238
+ "lr_disc": 0.0002,
239
+ "lr_scheduler_gen": "ExponentialLR",
240
+ "lr_scheduler_gen_params": {
241
+ "gamma": 0.999875,
242
+ "last_epoch": -1
243
+ },
244
+ "lr_scheduler_disc": "ExponentialLR",
245
+ "lr_scheduler_disc_params": {
246
+ "gamma": 0.999875,
247
+ "last_epoch": -1
248
+ },
249
+ "kl_loss_alpha": 1.0,
250
+ "disc_loss_alpha": 1.0,
251
+ "gen_loss_alpha": 1.0,
252
+ "feat_loss_alpha": 1.0,
253
+ "mel_loss_alpha": 45.0,
254
+ "dur_loss_alpha": 1.0,
255
+ "speaker_encoder_loss_alpha": 9.0,
256
+ "return_wav": true,
257
+ "use_weighted_sampler": false,
258
+ "weighted_sampler_attrs": {},
259
+ "weighted_sampler_multipliers": {},
260
+ "r": 1,
261
+ "num_speakers": 27,
262
+ "use_speaker_embedding": false,
263
+ "speakers_file": "supplemental/speakers.pth",
264
+ "speaker_embedding_channels": 256,
265
+ "language_ids_file": "supplemental/language_ids.json",
266
+ "use_language_embedding": true,
267
+ "use_d_vector_file": true,
268
+ "d_vector_file": [
269
+ "supplemental/speakers-base.json",
270
+ "supplemental/speakers-dataset.pth"
271
+ ],
272
+ "d_vector_dim": 512
273
+ }
prepare_model.py ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ import os
3
+ import subprocess
4
+
5
+ def generate_html_output(data, repository_path):
6
+ with open('speakers.md', 'a') as file:
7
+ for speaker_id, speaker_info in data.items():
8
+ out_path = f"{repository_path}/samples/{speaker_id}.wav"
9
+ age = speaker_info['age']
10
+ gender = speaker_info['gender']
11
+ if gender == 'F':
12
+ gender = 'female'
13
+ elif gender == "M":
14
+ gender = 'male'
15
+ accents = speaker_info['accents']
16
+ region = speaker_info['region']
17
+
18
+ file.write(f"<p>VCTK_{speaker_id}: {age} year old {gender}, {accents} accent ({region})<audio controls><source src=\"{out_path}\" type=\"audio/wav\"></audio> </p>\n")
19
+
20
+
21
+ # Load the data from the provided dictionary
22
+ data = {
23
+ "p237": {"age": 22, "gender": "M", "accents": "Scottish", "region": "Fife"},
24
+ "p241": {"age": 21, "gender": "M", "accents": "Scottish", "region": "Perth"},
25
+ "p245": {"age": 25, "gender": "M", "accents": "Irish", "region": "Dublin"},
26
+ "p246": {"age": 22, "gender": "M", "accents": "Scottish", "region": "Selkirk"},
27
+ "p247": {"age": 22, "gender": "M", "accents": "Scottish", "region": "Argyll"},
28
+ "p252": {"age": 22, "gender": "M", "accents": "Scottish", "region": "Edinburgh"},
29
+ "p255": {"age": 19, "gender": "M", "accents": "Scottish", "region": "Galloway"},
30
+ "p260": {"age": 21, "gender": "M", "accents": "Scottish", "region": "Orkney"},
31
+ "p263": {"age": 22, "gender": "M", "accents": "Scottish", "region": "Aberdeen"},
32
+ "p271": {"age": 19, "gender": "M", "accents": "Scottish", "region": "Fife"},
33
+ "p272": {"age": 23, "gender": "M", "accents": "Scottish", "region": "Edinburgh"},
34
+ "p275": {"age": 23, "gender": "M", "accents": "Scottish", "region": "Midlothian"},
35
+ "p281": {"age": 29, "gender": "M", "accents": "Scottish", "region": "Edinburgh"},
36
+ "p284": {"age": 20, "gender": "M", "accents": "Scottish", "region": "Fife"},
37
+ "p285": {"age": 21, "gender": "M", "accents": "Scottish", "region": "Edinburgh"},
38
+ "p292": {"age": 23, "gender": "M", "accents": "NorthernIrish", "region": "Belfast"},
39
+ "p298": {"age": 19, "gender": "M", "accents": "Irish", "region": "Tipperary"},
40
+ "p304": {"age": 22, "gender": "M", "accents": "NorthernIrish", "region": "Belfast"},
41
+ "p326": {"age": 26, "gender": "M", "accents": "Australian English", "region": "Sydney"},
42
+ "p364": {"age": 23, "gender": "M", "accents": "Irish", "region": "Donegal"},
43
+ "p374": {"age": 28, "gender": "M", "accents": "Australian English", "region": "The Outback"},
44
+ }
45
+
46
+ # Convert the data to JSON format
47
+ json_data = json.dumps(data, indent=2)
48
+
49
+ # Save the JSON data to a file
50
+ with open('speakers-log.json', 'w') as file:
51
+ file.write(json_data)
52
+
53
+ # Run the TTS command to get the speaker indices
54
+ command = "tts --model_path checkpoint_85000.pth --config_path config.json --list_speaker_idxs | grep -vE '^(\s*\||\s*>|\s*$)'"
55
+ output = subprocess.check_output(command, shell=True, text=True)
56
+
57
+ # Parse the JSON output into a Python dictionary
58
+ speaker_indices = eval(output)
59
+
60
+ # Load the speaker IDs from speakers.json
61
+ with open('speakers-log.json', 'r') as file:
62
+ speaker_ids = json.load(file)
63
+
64
+ # Create the speakers.md file
65
+ with open('speakers.md', 'w') as file:
66
+ for speaker_idx in speaker_indices:
67
+ # Remove the 'VCTK_' prefix
68
+ speaker_id = speaker_idx.replace('VCTK_', '')
69
+
70
+ # Lookup the speaker ID in the loaded speaker IDs
71
+ if speaker_id in speaker_ids:
72
+ speaker_id_json = speaker_ids[speaker_id]
73
+ else:
74
+ continue
75
+
76
+ # # Generate the TTS command to create the audio file
77
+ text = f"Hello, I am from {speaker_id_json['region']}. I hope that you will select my voice for your project. Thank you."
78
+ # # make samples directory if it doesn't exist
79
+ if not os.path.exists("samples"):
80
+ os.makedirs("samples")
81
+
82
+ out_path = f"samples/{speaker_id}.wav"
83
+ tts_command = f"tts --text \"{text}\" --model_path checkpoint_85000.pth --language_idx en --config_path config.json --speaker_idx \"VCTK_{speaker_id}\" --out_path {out_path}"
84
+
85
+ # Execute the TTS command
86
+ os.system(tts_command)
87
+
88
+ # Write the speaker information to the speakers.md file
89
+ generate_html_output({speaker_id: speaker_id_json}, "https://huggingface.co/voices/VCTK_European_English_Males/resolve/main")
samples/p237.wav ADDED
Binary file (184 kB). View file
 
samples/p241.wav ADDED
Binary file (188 kB). View file
 
samples/p245.wav ADDED
Binary file (218 kB). View file
 
samples/p246.wav ADDED
Binary file (223 kB). View file
 
samples/p247.wav ADDED
Binary file (191 kB). View file
 
samples/p252.wav ADDED
Binary file (194 kB). View file
 
samples/p255.wav ADDED
Binary file (203 kB). View file
 
samples/p260.wav ADDED
Binary file (187 kB). View file
 
samples/p263.wav ADDED
Binary file (201 kB). View file
 
samples/p271.wav ADDED
Binary file (208 kB). View file
 
samples/p272.wav ADDED
Binary file (203 kB). View file
 
samples/p275.wav ADDED
Binary file (184 kB). View file
 
samples/p281.wav ADDED
Binary file (203 kB). View file
 
samples/p284.wav ADDED
Binary file (182 kB). View file
 
samples/p285.wav ADDED
Binary file (179 kB). View file
 
samples/p292.wav ADDED
Binary file (188 kB). View file
 
samples/p298.wav ADDED
Binary file (188 kB). View file
 
samples/p304.wav ADDED
Binary file (197 kB). View file
 
samples/p326.wav ADDED
Binary file (182 kB). View file
 
samples/p364.wav ADDED
Binary file (215 kB). View file
 
samples/p374.wav ADDED
Binary file (217 kB). View file
 
speakers-log.json ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "p237": {
3
+ "age": 22,
4
+ "gender": "M",
5
+ "accents": "Scottish",
6
+ "region": "Fife"
7
+ },
8
+ "p241": {
9
+ "age": 21,
10
+ "gender": "M",
11
+ "accents": "Scottish",
12
+ "region": "Perth"
13
+ },
14
+ "p245": {
15
+ "age": 25,
16
+ "gender": "M",
17
+ "accents": "Irish",
18
+ "region": "Dublin"
19
+ },
20
+ "p246": {
21
+ "age": 22,
22
+ "gender": "M",
23
+ "accents": "Scottish",
24
+ "region": "Selkirk"
25
+ },
26
+ "p247": {
27
+ "age": 22,
28
+ "gender": "M",
29
+ "accents": "Scottish",
30
+ "region": "Argyll"
31
+ },
32
+ "p252": {
33
+ "age": 22,
34
+ "gender": "M",
35
+ "accents": "Scottish",
36
+ "region": "Edinburgh"
37
+ },
38
+ "p255": {
39
+ "age": 19,
40
+ "gender": "M",
41
+ "accents": "Scottish",
42
+ "region": "Galloway"
43
+ },
44
+ "p260": {
45
+ "age": 21,
46
+ "gender": "M",
47
+ "accents": "Scottish",
48
+ "region": "Orkney"
49
+ },
50
+ "p263": {
51
+ "age": 22,
52
+ "gender": "M",
53
+ "accents": "Scottish",
54
+ "region": "Aberdeen"
55
+ },
56
+ "p271": {
57
+ "age": 19,
58
+ "gender": "M",
59
+ "accents": "Scottish",
60
+ "region": "Fife"
61
+ },
62
+ "p272": {
63
+ "age": 23,
64
+ "gender": "M",
65
+ "accents": "Scottish",
66
+ "region": "Edinburgh"
67
+ },
68
+ "p275": {
69
+ "age": 23,
70
+ "gender": "M",
71
+ "accents": "Scottish",
72
+ "region": "Midlothian"
73
+ },
74
+ "p281": {
75
+ "age": 29,
76
+ "gender": "M",
77
+ "accents": "Scottish",
78
+ "region": "Edinburgh"
79
+ },
80
+ "p284": {
81
+ "age": 20,
82
+ "gender": "M",
83
+ "accents": "Scottish",
84
+ "region": "Fife"
85
+ },
86
+ "p285": {
87
+ "age": 21,
88
+ "gender": "M",
89
+ "accents": "Scottish",
90
+ "region": "Edinburgh"
91
+ },
92
+ "p292": {
93
+ "age": 23,
94
+ "gender": "M",
95
+ "accents": "NorthernIrish",
96
+ "region": "Belfast"
97
+ },
98
+ "p298": {
99
+ "age": 19,
100
+ "gender": "M",
101
+ "accents": "Irish",
102
+ "region": "Tipperary"
103
+ },
104
+ "p304": {
105
+ "age": 22,
106
+ "gender": "M",
107
+ "accents": "NorthernIrish",
108
+ "region": "Belfast"
109
+ },
110
+ "p326": {
111
+ "age": 26,
112
+ "gender": "M",
113
+ "accents": "Australian English",
114
+ "region": "Sydney"
115
+ },
116
+ "p364": {
117
+ "age": 23,
118
+ "gender": "M",
119
+ "accents": "Irish",
120
+ "region": "Donegal"
121
+ },
122
+ "p374": {
123
+ "age": 28,
124
+ "gender": "M",
125
+ "accents": "Australian English",
126
+ "region": "The Outback"
127
+ }
128
+ }
speakers.md ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <p>VCTK_p237: 22 year old male, Scottish accent (Fife)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p237.wav" type="audio/wav"></audio> </p>
2
+ <p>VCTK_p241: 21 year old male, Scottish accent (Perth)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p241.wav" type="audio/wav"></audio> </p>
3
+ <p>VCTK_p245: 25 year old male, Irish accent (Dublin)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p245.wav" type="audio/wav"></audio> </p>
4
+ <p>VCTK_p246: 22 year old male, Scottish accent (Selkirk)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p246.wav" type="audio/wav"></audio> </p>
5
+ <p>VCTK_p247: 22 year old male, Scottish accent (Argyll)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p247.wav" type="audio/wav"></audio> </p>
6
+ <p>VCTK_p252: 22 year old male, Scottish accent (Edinburgh)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p252.wav" type="audio/wav"></audio> </p>
7
+ <p>VCTK_p255: 19 year old male, Scottish accent (Galloway)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p255.wav" type="audio/wav"></audio> </p>
8
+ <p>VCTK_p260: 21 year old male, Scottish accent (Orkney)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p260.wav" type="audio/wav"></audio> </p>
9
+ <p>VCTK_p263: 22 year old male, Scottish accent (Aberdeen)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p263.wav" type="audio/wav"></audio> </p>
10
+ <p>VCTK_p271: 19 year old male, Scottish accent (Fife)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p271.wav" type="audio/wav"></audio> </p>
11
+ <p>VCTK_p272: 23 year old male, Scottish accent (Edinburgh)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p272.wav" type="audio/wav"></audio> </p>
12
+ <p>VCTK_p275: 23 year old male, Scottish accent (Midlothian)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p275.wav" type="audio/wav"></audio> </p>
13
+ <p>VCTK_p281: 29 year old male, Scottish accent (Edinburgh)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p281.wav" type="audio/wav"></audio> </p>
14
+ <p>VCTK_p284: 20 year old male, Scottish accent (Fife)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p284.wav" type="audio/wav"></audio> </p>
15
+ <p>VCTK_p285: 21 year old male, Scottish accent (Edinburgh)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p285.wav" type="audio/wav"></audio> </p>
16
+ <p>VCTK_p292: 23 year old male, NorthernIrish accent (Belfast)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p292.wav" type="audio/wav"></audio> </p>
17
+ <p>VCTK_p298: 19 year old male, Irish accent (Tipperary)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p298.wav" type="audio/wav"></audio> </p>
18
+ <p>VCTK_p304: 22 year old male, NorthernIrish accent (Belfast)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p304.wav" type="audio/wav"></audio> </p>
19
+ <p>VCTK_p326: 26 year old male, Australian English accent (Sydney)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p326.wav" type="audio/wav"></audio> </p>
20
+ <p>VCTK_p364: 23 year old male, Irish accent (Donegal)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p364.wav" type="audio/wav"></audio> </p>
21
+ <p>VCTK_p374: 28 year old male, Australian English accent (The Outback)<audio controls><source src="https://huggingface.co/voices/VCTK_European_English_Males/resolve/main/samples/p374.wav" type="audio/wav"></audio> </p>
supplemental/config_se.json ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model": "speaker_encoder",
3
+ "run_name": "speaker_encoder",
4
+ "run_description": "resnet speaker encoder trained with commonvoice all languages dev and train, Voxceleb 1 dev and Voxceleb 2 dev",
5
+ "epochs": 100000,
6
+ "batch_size": null,
7
+ "eval_batch_size": null,
8
+ "mixed_precision": false,
9
+ "run_eval": true,
10
+ "test_delay_epochs": 0,
11
+ "print_eval": false,
12
+ "print_step": 50,
13
+ "tb_plot_step": 100,
14
+ "tb_model_param_stats": false,
15
+ "save_step": 1000,
16
+ "checkpoint": true,
17
+ "keep_all_best": false,
18
+ "keep_after": 10000,
19
+ "num_loader_workers": 8,
20
+ "num_val_loader_workers": 0,
21
+ "use_noise_augment": false,
22
+ "output_path": "../checkpoints/speaker_encoder/language_balanced/normalized/angleproto-4-samples-by-speakers/",
23
+ "distributed_backend": "nccl",
24
+ "distributed_url": "tcp://localhost:54321",
25
+ "audio": {
26
+ "fft_size": 512,
27
+ "win_length": 400,
28
+ "hop_length": 160,
29
+ "frame_shift_ms": null,
30
+ "frame_length_ms": null,
31
+ "stft_pad_mode": "reflect",
32
+ "sample_rate": 16000,
33
+ "resample": false,
34
+ "preemphasis": 0.97,
35
+ "ref_level_db": 20,
36
+ "do_sound_norm": false,
37
+ "do_trim_silence": false,
38
+ "trim_db": 60,
39
+ "power": 1.5,
40
+ "griffin_lim_iters": 60,
41
+ "num_mels": 64,
42
+ "mel_fmin": 0.0,
43
+ "mel_fmax": 8000.0,
44
+ "spec_gain": 20,
45
+ "signal_norm": false,
46
+ "min_level_db": -100,
47
+ "symmetric_norm": false,
48
+ "max_norm": 4.0,
49
+ "clip_norm": false,
50
+ "stats_path": null,
51
+ "do_rms_norm": true,
52
+ "db_level": -27.0
53
+ },
54
+ "datasets": [
55
+ {
56
+ "name": "voxceleb2",
57
+ "path": "/workspace/scratch/ecasanova/datasets/VoxCeleb/vox2_dev_aac/",
58
+ "meta_file_train": null,
59
+ "ununsed_speakers": null,
60
+ "meta_file_val": null,
61
+ "meta_file_attn_mask": "",
62
+ "language": "voxceleb"
63
+ }
64
+ ],
65
+ "model_params": {
66
+ "model_name": "resnet",
67
+ "input_dim": 64,
68
+ "use_torch_spec": true,
69
+ "log_input": true,
70
+ "proj_dim": 512
71
+ },
72
+ "audio_augmentation": {
73
+ "p": 0.5,
74
+ "rir": {
75
+ "rir_path": "/workspace/store/ecasanova/ComParE/RIRS_NOISES/simulated_rirs/",
76
+ "conv_mode": "full"
77
+ },
78
+ "additive": {
79
+ "sounds_path": "/workspace/store/ecasanova/ComParE/musan/",
80
+ "speech": {
81
+ "min_snr_in_db": 13,
82
+ "max_snr_in_db": 20,
83
+ "min_num_noises": 1,
84
+ "max_num_noises": 1
85
+ },
86
+ "noise": {
87
+ "min_snr_in_db": 0,
88
+ "max_snr_in_db": 15,
89
+ "min_num_noises": 1,
90
+ "max_num_noises": 1
91
+ },
92
+ "music": {
93
+ "min_snr_in_db": 5,
94
+ "max_snr_in_db": 15,
95
+ "min_num_noises": 1,
96
+ "max_num_noises": 1
97
+ }
98
+ },
99
+ "gaussian": {
100
+ "p": 0.0,
101
+ "min_amplitude": 0.0,
102
+ "max_amplitude": 1e-05
103
+ }
104
+ },
105
+ "storage": {
106
+ "sample_from_storage_p": 0.5,
107
+ "storage_size": 40
108
+ },
109
+ "max_train_step": 1000000,
110
+ "loss": "angleproto",
111
+ "grad_clip": 3.0,
112
+ "lr": 0.0001,
113
+ "lr_decay": false,
114
+ "warmup_steps": 4000,
115
+ "wd": 1e-06,
116
+ "steps_plot_stats": 100,
117
+ "num_speakers_in_batch": 100,
118
+ "num_utters_per_speaker": 4,
119
+ "skip_speakers": true,
120
+ "voice_len": 2.0
121
+ }
supplemental/language_ids.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "en": 0,
3
+ "fr-fr": 1,
4
+ "pt-br": 2
5
+ }
supplemental/model_se.pth.tar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8f96efb20cbeeefd81fd8336d7f0155bf8902f82f9474e58ccb19d9e12345172
3
+ size 44610930
supplemental/speaker_ids.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "female-en-5": 0,
3
+ "female-en-5\n": 1,
4
+ "female-pt-4\n": 2,
5
+ "male-en-2": 3,
6
+ "male-en-2\n": 4,
7
+ "male-pt-3\n": 5,
8
+ "VCTK_p237": 6,
9
+ "VCTK_p241": 7,
10
+ "VCTK_p245": 8,
11
+ "VCTK_p246": 9,
12
+ "VCTK_p247": 10,
13
+ "VCTK_p252": 11,
14
+ "VCTK_p255": 12,
15
+ "VCTK_p260": 13,
16
+ "VCTK_p263": 14,
17
+ "VCTK_p271": 15,
18
+ "VCTK_p272": 16,
19
+ "VCTK_p275": 17,
20
+ "VCTK_p281": 18,
21
+ "VCTK_p284": 19,
22
+ "VCTK_p285": 20,
23
+ "VCTK_p292": 21,
24
+ "VCTK_p298": 22,
25
+ "VCTK_p304": 23,
26
+ "VCTK_p326": 24,
27
+ "VCTK_p364": 25,
28
+ "VCTK_p374": 26
29
+ }
supplemental/speakers-base.json ADDED
The diff for this file is too large to render. See raw diff
 
supplemental/speakers-combined.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:317c015ff2e3a80584b8a651851169730567182b7860898bdc074457eb5245c4
3
+ size 39676591
supplemental/speakers-dataset.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9f997b05add5e90356dcfda0aafa3db5983cc0aca2fcb191dc9abd4cd976befd
3
+ size 39495791
supplemental/speakers.json ADDED
Binary file (110 MB). View file