anzorq commited on
Commit
2688851
1 Parent(s): b079ff1

Upload folder using huggingface_hub

Browse files
best_model.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:535a0d521d981183d98cb66eb3d127a8428655dd38e472fd8dfe9b22884a56a2
3
+ size 997753925
best_model_56351.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:535a0d521d981183d98cb66eb3d127a8428655dd38e472fd8dfe9b22884a56a2
3
+ size 997753925
config.json ADDED
@@ -0,0 +1,305 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "output_path": "/aaa/train_output",
3
+ "logger_uri": null,
4
+ "run_name": "vits_kbd_female",
5
+ "project_name": null,
6
+ "run_description": "\ud83d\udc38Coqui trainer run.",
7
+ "print_step": 25,
8
+ "plot_step": 100,
9
+ "model_param_stats": false,
10
+ "wandb_entity": null,
11
+ "dashboard_logger": "wandb",
12
+ "save_on_interrupt": true,
13
+ "log_model_step": null,
14
+ "save_step": 1000,
15
+ "save_n_checkpoints": 5,
16
+ "save_checkpoints": true,
17
+ "save_all_best": false,
18
+ "save_best_after": 10000,
19
+ "target_loss": null,
20
+ "print_eval": true,
21
+ "test_delay_epochs": -1,
22
+ "run_eval": true,
23
+ "run_eval_steps": null,
24
+ "distributed_backend": "nccl",
25
+ "distributed_url": "tcp://localhost:54321",
26
+ "mixed_precision": false,
27
+ "precision": "fp16",
28
+ "epochs": 1000,
29
+ "batch_size": 24,
30
+ "eval_batch_size": 16,
31
+ "grad_clip": [
32
+ 1000,
33
+ 1000
34
+ ],
35
+ "scheduler_after_epoch": true,
36
+ "lr": 0.001,
37
+ "optimizer": "AdamW",
38
+ "optimizer_params": {
39
+ "betas": [
40
+ 0.8,
41
+ 0.99
42
+ ],
43
+ "eps": 1e-09,
44
+ "weight_decay": 0.01
45
+ },
46
+ "lr_scheduler": null,
47
+ "lr_scheduler_params": {},
48
+ "use_grad_scaler": false,
49
+ "allow_tf32": false,
50
+ "cudnn_enable": true,
51
+ "cudnn_deterministic": false,
52
+ "cudnn_benchmark": false,
53
+ "training_seed": 54321,
54
+ "model": "vits",
55
+ "num_loader_workers": 0,
56
+ "num_eval_loader_workers": 2,
57
+ "use_noise_augment": false,
58
+ "audio": {
59
+ "fft_size": 1024,
60
+ "win_length": 1024,
61
+ "hop_length": 256,
62
+ "frame_shift_ms": null,
63
+ "frame_length_ms": null,
64
+ "stft_pad_mode": "reflect",
65
+ "sample_rate": 24000,
66
+ "resample": false,
67
+ "preemphasis": 0.0,
68
+ "ref_level_db": 20,
69
+ "do_sound_norm": false,
70
+ "log_func": "np.log10",
71
+ "do_trim_silence": true,
72
+ "trim_db": 45,
73
+ "do_rms_norm": false,
74
+ "db_level": null,
75
+ "power": 1.5,
76
+ "griffin_lim_iters": 60,
77
+ "num_mels": 80,
78
+ "mel_fmin": 0,
79
+ "mel_fmax": null,
80
+ "spec_gain": 20,
81
+ "do_amp_to_db_linear": true,
82
+ "do_amp_to_db_mel": true,
83
+ "pitch_fmax": 640.0,
84
+ "pitch_fmin": 1.0,
85
+ "signal_norm": true,
86
+ "min_level_db": -100,
87
+ "symmetric_norm": true,
88
+ "max_norm": 4.0,
89
+ "clip_norm": true,
90
+ "stats_path": null
91
+ },
92
+ "use_phonemes": false,
93
+ "phonemizer": null,
94
+ "phoneme_language": null,
95
+ "compute_input_seq_cache": true,
96
+ "text_cleaner": "basic_cleaners",
97
+ "enable_eos_bos_chars": false,
98
+ "test_sentences_file": "",
99
+ "phoneme_cache_path": "/aaa/train_output/phoneme_cache",
100
+ "characters": {
101
+ "characters_class": "TTS.tts.utils.text.characters.Graphemes",
102
+ "vocab_dict": null,
103
+ "pad": "<PAD>",
104
+ "eos": "<EOS>",
105
+ "bos": "<BOS>",
106
+ "blank": "<BLNK>",
107
+ "characters": "abnhikorst\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\u04cf",
108
+ "punctuations": "!\"(),-.:?\u00ab\u00bb\u2013 ",
109
+ "phonemes": "",
110
+ "is_unique": true,
111
+ "is_sorted": true
112
+ },
113
+ "add_blank": true,
114
+ "batch_group_size": 5,
115
+ "loss_masking": null,
116
+ "min_audio_len": 1,
117
+ "max_audio_len": Infinity,
118
+ "min_text_len": 1,
119
+ "max_text_len": Infinity,
120
+ "compute_f0": false,
121
+ "compute_energy": false,
122
+ "compute_linear_spec": true,
123
+ "precompute_num_workers": 0,
124
+ "start_by_longest": false,
125
+ "shuffle": false,
126
+ "drop_last": false,
127
+ "datasets": [
128
+ {
129
+ "formatter": "mozilla",
130
+ "dataset_name": "",
131
+ "path": "dataset/",
132
+ "meta_file_train": "metadata.csv",
133
+ "ignored_speakers": null,
134
+ "language": "",
135
+ "phonemizer": "",
136
+ "meta_file_val": "",
137
+ "meta_file_attn_mask": ""
138
+ }
139
+ ],
140
+ "test_sentences": [
141
+ [
142
+ "\u0443\u043c\u044b\u043f\u04cf\u0430\u0449\u04cf\u044d\u0443 \u043a\u044a\u0435\u0434\u0430\u04cf\u0443\u0438 \u043f\u0441\u043e\u0440\u0438 \u043a\u044a\u044d\u043f\u0449\u04cf\u044d\u043d\u0449"
143
+ ],
144
+ [
145
+ "\u0449\u0438\u0445\u0443 \u0442\u0445\u044c\u044d\u043c\u043f\u044d \u0446\u04cf\u044b\u043a\u04cf\u0443\u0445\u044d\u043c \u0437\u0430\u0433\u044a\u044d\u0441\u044b\u0441\u0443 \u0430\u0431\u044b \u0441\u044d\u043b\u0430\u043c \u0438\u0440\u0430\u0445\u044b\u0436 \u0449\u0445\u044c\u044d\u043a\u04cf\u044d \u043f\u0441\u044b\u0433\u044a\u0443\u044d \u043b\u0430\u043d\u0442\u04cf\u044d\u0445\u044d\u043c \u0437\u0430\u0433\u044a\u044d\u0448\u0430\u0443\u044d \u0449\u0445\u044c\u044d\u0449\u044d \u0445\u0443\u0430\u0449\u04cf\u044b\u0436"
146
+ ],
147
+ [
148
+ "\u0443\u044d\u0440\u0430\u043c\u044b\u0431\u0433\u044a\u0443\u043c \u043a\u044a\u044b\u0442\u0435\u0443\u0432\u0430 \u0446\u04cf\u044b\u0445\u0443 \u04cf\u0443\u0432\u044b\u043c \u044f \u043d\u044d\u0440 \u0442\u043e\u0434\u0438\u0435 \u043a\u0445\u044a\u044d\u043c \u044f\u0445\u044c\u044b\u043c"
149
+ ],
150
+ [
151
+ "\u0434\u044d\u043d\u044d \u0444\u0445\u044c\u0430 \u0441\u0438 \u043b\u044a\u0430\u0433\u044a\u0443\u043d\u044b\u0433\u044a\u044d\u0440"
152
+ ],
153
+ [
154
+ "\u0430 \u043c\u0430\u0445\u0443\u044d\u043c \u0435\u0436\u044c\u0430\u0449 \u0446\u04cf\u044b\u0445\u0443 \u0433\u044a\u0430\u0449\u04cf\u044d\u0440 \u0437\u044b\u0442\u0435\u043a\u04cf\u0443\u044d\u0434\u0430 \u043b\u044a\u0430\u0433\u044a\u0443\u043d\u044b\u0433\u044a\u044d\u0440"
155
+ ],
156
+ [
157
+ "\u0435\u0437\u044b\u0445\u044d\u0440\u0438 \u043b\u044d\u0436\u044c\u044b\u0433\u044a\u044d\u0444\u04cf\u043a\u04cf\u044d \u0437\u0438 \u0446\u04cf\u044d \u043a\u044a\u0430\u04cf\u044d\u0442 \u043a\u044a\u0443\u0430\u0436\u044d \u0449\u04cf\u0430\u043b\u044d\u0433\u044a\u0443\u0430\u043b\u044d\u043c \u044f\u0449\u044b\u0449\u0442"
158
+ ],
159
+ [
160
+ "\u0434\u0430\u0443\u044d \u0445\u044a\u0443\u0430\u043c\u0438 \u0444\u0435\u043d\u044d \u043a\u044a\u0443\u0430\u0436\u044d\u043c \u044f\u0444\u04cf\u044d\u04cf\u0435\u044f\u043a\u044a\u044b\u043c \u043a\u044a\u044d\u0437\u044b\u0448\u0430 \u0443\u043d\u0430\u0433\u044a\u0443\u044d\u0440\u0442\u0438 \u2014 \u044f \u043d\u044d-\u044f \u043f\u0441\u044d\u0442"
161
+ ],
162
+ [
163
+ "\u0445\u044a\u044b\u0434\u0436\u044d\u0431\u0437\u0440\u0438 \u0449\u0442\u044d\u0436\u0440\u0438 \u0435\u043a\u044a\u0443\u0436\u0430\u0443\u044d \u0436\u0430\u04cf\u044d \u0430\u0443\u044d \u0445\u0443\u0445\u044d\u0447\u044b\u0436\u0430\u043a\u044a\u044b\u043c"
164
+ ],
165
+ [
166
+ "\u0430\u0443\u044d \u0430\u0431\u044b\u0438 \u043a\u0443\u044d\u0434 \u0438\u0445\u044c\u0430\u043a\u044a\u044b\u043c"
167
+ ]
168
+ ],
169
+ "eval_split_max_size": null,
170
+ "eval_split_size": 0.01,
171
+ "use_speaker_weighted_sampler": false,
172
+ "speaker_weighted_sampler_alpha": 1.0,
173
+ "use_language_weighted_sampler": false,
174
+ "language_weighted_sampler_alpha": 1.0,
175
+ "use_length_weighted_sampler": false,
176
+ "length_weighted_sampler_alpha": 1.0,
177
+ "model_args": {
178
+ "num_chars": 60,
179
+ "out_channels": 513,
180
+ "spec_segment_size": 32,
181
+ "hidden_channels": 192,
182
+ "hidden_channels_ffn_text_encoder": 768,
183
+ "num_heads_text_encoder": 2,
184
+ "num_layers_text_encoder": 6,
185
+ "kernel_size_text_encoder": 3,
186
+ "dropout_p_text_encoder": 0.1,
187
+ "dropout_p_duration_predictor": 0.5,
188
+ "kernel_size_posterior_encoder": 5,
189
+ "dilation_rate_posterior_encoder": 1,
190
+ "num_layers_posterior_encoder": 16,
191
+ "kernel_size_flow": 5,
192
+ "dilation_rate_flow": 1,
193
+ "num_layers_flow": 4,
194
+ "resblock_type_decoder": "1",
195
+ "resblock_kernel_sizes_decoder": [
196
+ 3,
197
+ 7,
198
+ 11
199
+ ],
200
+ "resblock_dilation_sizes_decoder": [
201
+ [
202
+ 1,
203
+ 3,
204
+ 5
205
+ ],
206
+ [
207
+ 1,
208
+ 3,
209
+ 5
210
+ ],
211
+ [
212
+ 1,
213
+ 3,
214
+ 5
215
+ ]
216
+ ],
217
+ "upsample_rates_decoder": [
218
+ 8,
219
+ 8,
220
+ 2,
221
+ 2
222
+ ],
223
+ "upsample_initial_channel_decoder": 512,
224
+ "upsample_kernel_sizes_decoder": [
225
+ 16,
226
+ 16,
227
+ 4,
228
+ 4
229
+ ],
230
+ "periods_multi_period_discriminator": [
231
+ 2,
232
+ 3,
233
+ 5,
234
+ 7,
235
+ 11
236
+ ],
237
+ "use_sdp": true,
238
+ "noise_scale": 1.0,
239
+ "inference_noise_scale": 0.667,
240
+ "length_scale": 1,
241
+ "noise_scale_dp": 1.0,
242
+ "inference_noise_scale_dp": 1.0,
243
+ "max_inference_len": null,
244
+ "init_discriminator": true,
245
+ "use_spectral_norm_disriminator": false,
246
+ "use_speaker_embedding": false,
247
+ "num_speakers": 0,
248
+ "speakers_file": null,
249
+ "d_vector_file": null,
250
+ "speaker_embedding_channels": 256,
251
+ "use_d_vector_file": false,
252
+ "d_vector_dim": 0,
253
+ "detach_dp_input": true,
254
+ "use_language_embedding": false,
255
+ "embedded_language_dim": 4,
256
+ "num_languages": 0,
257
+ "language_ids_file": null,
258
+ "use_speaker_encoder_as_loss": false,
259
+ "speaker_encoder_config_path": "",
260
+ "speaker_encoder_model_path": "",
261
+ "condition_dp_on_speaker": true,
262
+ "freeze_encoder": false,
263
+ "freeze_DP": false,
264
+ "freeze_PE": false,
265
+ "freeze_flow_decoder": false,
266
+ "freeze_waveform_decoder": false,
267
+ "encoder_sample_rate": null,
268
+ "interpolate_z": true,
269
+ "reinit_DP": false,
270
+ "reinit_text_encoder": false
271
+ },
272
+ "lr_gen": 0.0002,
273
+ "lr_disc": 0.0002,
274
+ "lr_scheduler_gen": "ExponentialLR",
275
+ "lr_scheduler_gen_params": {
276
+ "gamma": 0.999875,
277
+ "last_epoch": -1
278
+ },
279
+ "lr_scheduler_disc": "ExponentialLR",
280
+ "lr_scheduler_disc_params": {
281
+ "gamma": 0.999875,
282
+ "last_epoch": -1
283
+ },
284
+ "kl_loss_alpha": 1.0,
285
+ "disc_loss_alpha": 1.0,
286
+ "gen_loss_alpha": 1.0,
287
+ "feat_loss_alpha": 1.0,
288
+ "mel_loss_alpha": 45.0,
289
+ "dur_loss_alpha": 1.0,
290
+ "speaker_encoder_loss_alpha": 1.0,
291
+ "return_wav": true,
292
+ "use_weighted_sampler": false,
293
+ "weighted_sampler_attrs": {},
294
+ "weighted_sampler_multipliers": {},
295
+ "r": 1,
296
+ "num_speakers": 0,
297
+ "use_speaker_embedding": false,
298
+ "speakers_file": null,
299
+ "speaker_embedding_channels": 256,
300
+ "language_ids_file": null,
301
+ "use_language_embedding": false,
302
+ "use_d_vector_file": false,
303
+ "d_vector_file": null,
304
+ "d_vector_dim": 0
305
+ }
train_vits.py ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+
3
+ from trainer import Trainer, TrainerArgs
4
+
5
+ from TTS.tts.configs.shared_configs import BaseDatasetConfig , CharactersConfig
6
+ from TTS.config.shared_configs import BaseAudioConfig
7
+ from TTS.tts.configs.vits_config import VitsConfig
8
+ from TTS.tts.datasets import load_tts_samples
9
+ from TTS.tts.models.vits import Vits, VitsAudioConfig
10
+ from TTS.tts.utils.text.tokenizer import TTSTokenizer
11
+ from TTS.utils.audio import AudioProcessor
12
+ from TTS.utils.downloaders import download_thorsten_de
13
+
14
+ output_path = os.path.dirname(os.path.abspath(__file__))
15
+ dataset_config = BaseDatasetConfig(
16
+ formatter="mozilla", meta_file_train="metadata.csv", path="dataset/"
17
+ )
18
+
19
+
20
+
21
+ audio_config = BaseAudioConfig(
22
+ sample_rate=24000,
23
+ do_trim_silence=True,
24
+ resample=False,
25
+ mel_fmin=0,
26
+ mel_fmax=None
27
+ )
28
+ character_config=CharactersConfig(
29
+ characters='abnhikorstабвгдежзийклмнопрстуфхцчшщъыьэюяӏ',
30
+ punctuations='!"(),-.:?«»– ',
31
+ phonemes='',
32
+ pad="<PAD>",
33
+ eos="<EOS>",
34
+ bos="<BOS>",
35
+ blank="<BLNK>",
36
+ )
37
+ config = VitsConfig(
38
+ dashboard_logger='wandb',
39
+ audio=audio_config,
40
+ run_name="vits_kbd_female",
41
+ batch_size=24,
42
+ eval_batch_size=16,
43
+ batch_group_size=5,
44
+ num_loader_workers=0,
45
+ num_eval_loader_workers=2,
46
+ run_eval=True,
47
+ test_delay_epochs=-1,
48
+ epochs=1000,
49
+ save_step=1000,
50
+ text_cleaner="basic_cleaners",
51
+ use_phonemes=False,
52
+ #phoneme_language="fa",
53
+ characters=character_config,
54
+ phoneme_cache_path=os.path.join(output_path, "phoneme_cache"),
55
+ compute_input_seq_cache=True,
56
+ print_step=25,
57
+ print_eval=True,
58
+ mixed_precision=False,
59
+ test_sentences=[
60
+ ["умыпӏащӏэу къедаӏуи псори къэпщӏэнщ"],
61
+ ["щиху тхьэмпэ цӏыкӏухэм загъэсысу абы сэлам ирахыж щхьэкӏэ псыгъуэ лантӏэхэм загъэшауэ щхьэщэ хуащӏыж"],
62
+ ["уэрамыбгъум къытеува цӏыху ӏувым я нэр тодие кхъэм яхьым"],
63
+ ["дэнэ фхьа си лъагъуныгъэр"],
64
+ ["а махуэм ежьащ цӏыху гъащӏэр зытекӏуэда лъагъуныгъэр"],
65
+ ["езыхэри лэжьыгъэфӏкӏэ зи цӏэ къаӏэт къуажэ щӏалэгъуалэм ящыщт"],
66
+ ["дауэ хъуами фенэ къуажэм яфӏэӏеякъым къэзыша унагъуэрти — я нэ-я псэт"],
67
+ ["хъыджэбзри щтэжри екъужауэ жаӏэ ауэ хухэчыжакъым"],
68
+ ["ауэ абыи куэд ихьакъым"]
69
+ ],
70
+ output_path=output_path,
71
+ datasets=[dataset_config],
72
+ )
73
+
74
+ # INITIALIZE THE AUDIO PROCESSOR
75
+ # Audio processor is used for feature extraction and audio I/O.
76
+ # It mainly serves to the dataloader and the training loggers.
77
+ ap = AudioProcessor.init_from_config(config)
78
+
79
+ # INITIALIZE THE TOKENIZER
80
+ # Tokenizer is used to convert text to sequences of token IDs.
81
+ # config is updated with the default characters if not defined in the config.
82
+ tokenizer, config = TTSTokenizer.init_from_config(config)
83
+
84
+ # LOAD DATA SAMPLES
85
+ # Each sample is a list of ```[text, audio_file_path, speaker_name]```
86
+ # You can define your custom sample loader returning the list of samples.
87
+ # Or define your custom formatter and pass it to the `load_tts_samples`.
88
+ # Check `TTS.tts.datasets.load_tts_samples` for more details.
89
+ train_samples, eval_samples = load_tts_samples(
90
+ dataset_config,
91
+ eval_split=True,
92
+ eval_split_max_size=config.eval_split_max_size,
93
+ eval_split_size=config.eval_split_size,
94
+ )
95
+
96
+ # init model
97
+ model = Vits(config, ap, tokenizer, speaker_manager=None)
98
+
99
+ # init the trainer and 🚀
100
+ trainer = Trainer(
101
+ TrainerArgs(),
102
+ config,
103
+ output_path,
104
+ model=model,
105
+ train_samples=train_samples,
106
+ eval_samples=eval_samples,
107
+ )
108
+ trainer.fit()
trainer_0_log.txt ADDED
The diff for this file is too large to render. See raw diff
 
trainer_1_log.txt ADDED
File without changes
trainer_2_log.txt ADDED
File without changes
trainer_3_log.txt ADDED
File without changes