Upload config_ft.yml
Browse files- config_ft.yml +112 -0
config_ft.yml
ADDED
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
log_dir: "Models/LJSpeech"
|
2 |
+
save_freq: 1
|
3 |
+
log_interval: 10
|
4 |
+
device: "cuda"
|
5 |
+
epochs: 50 # number of finetuning epoch (1 hour of data)
|
6 |
+
batch_size: 4
|
7 |
+
max_len: 200 # maximum number of frames
|
8 |
+
pretrained_model: "/content/StyleTTS2/Models/tost-tts/tost-tts-v1.pth"
|
9 |
+
second_stage_load_pretrained: true # set to true if the pre-trained model is for 2nd stage
|
10 |
+
load_only_params: false # set to true if do not want to load epoch numbers and optimizer parameters
|
11 |
+
|
12 |
+
F0_path: "Utils/JDC/bst.t7"
|
13 |
+
ASR_config: "Utils/ASR/config.yml"
|
14 |
+
ASR_path: "Utils/ASR/epoch_00080.pth"
|
15 |
+
PLBERT_dir: 'Utils/PLBERT/'
|
16 |
+
|
17 |
+
data_params:
|
18 |
+
train_data: "Data/Train_list.txt"
|
19 |
+
val_data: "Data/Val_list.txt"
|
20 |
+
root_path: "Data"
|
21 |
+
OOD_data: "Data/OOD_texts.txt"
|
22 |
+
min_length: 50 # sample until texts with this size are obtained for OOD texts
|
23 |
+
logger: "wandb"
|
24 |
+
|
25 |
+
preprocess_params:
|
26 |
+
sr: 24000
|
27 |
+
spect_params:
|
28 |
+
n_fft: 2048
|
29 |
+
win_length: 1200
|
30 |
+
hop_length: 300
|
31 |
+
|
32 |
+
model_params:
|
33 |
+
multispeaker: true
|
34 |
+
|
35 |
+
dim_in: 64
|
36 |
+
hidden_dim: 512
|
37 |
+
max_conv_dim: 512
|
38 |
+
n_layer: 3
|
39 |
+
n_mels: 80
|
40 |
+
|
41 |
+
n_token: 178 # number of phoneme tokens
|
42 |
+
max_dur: 50 # maximum duration of a single phoneme
|
43 |
+
style_dim: 128 # style vector size
|
44 |
+
|
45 |
+
dropout: 0.2
|
46 |
+
|
47 |
+
# config for decoder
|
48 |
+
decoder:
|
49 |
+
type: 'hifigan' # either hifigan or istftnet
|
50 |
+
resblock_kernel_sizes: [3,7,11]
|
51 |
+
upsample_rates : [10,5,3,2]
|
52 |
+
upsample_initial_channel: 512
|
53 |
+
resblock_dilation_sizes: [[1,3,5], [1,3,5], [1,3,5]]
|
54 |
+
upsample_kernel_sizes: [20,10,6,4]
|
55 |
+
|
56 |
+
# speech language model config
|
57 |
+
slm:
|
58 |
+
model: 'microsoft/wavlm-base-plus'
|
59 |
+
sr: 16000 # sampling rate of SLM
|
60 |
+
hidden: 768 # hidden size of SLM
|
61 |
+
nlayers: 13 # number of layers of SLM
|
62 |
+
initial_channel: 64 # initial channels of SLM discriminator head
|
63 |
+
|
64 |
+
# style diffusion model config
|
65 |
+
diffusion:
|
66 |
+
embedding_mask_proba: 0.1
|
67 |
+
# transformer config
|
68 |
+
transformer:
|
69 |
+
num_layers: 3
|
70 |
+
num_heads: 8
|
71 |
+
head_features: 64
|
72 |
+
multiplier: 2
|
73 |
+
|
74 |
+
# diffusion distribution config
|
75 |
+
dist:
|
76 |
+
sigma_data: 0.2 # placeholder for estimate_sigma_data set to false
|
77 |
+
estimate_sigma_data: true # estimate sigma_data from the current batch if set to true
|
78 |
+
mean: -3.0
|
79 |
+
std: 1.0
|
80 |
+
|
81 |
+
loss_params:
|
82 |
+
lambda_mel: 5. # mel reconstruction loss
|
83 |
+
lambda_gen: 1. # generator loss
|
84 |
+
lambda_slm: 1. # slm feature matching loss
|
85 |
+
|
86 |
+
lambda_mono: 1. # monotonic alignment loss (TMA)
|
87 |
+
lambda_s2s: 1. # sequence-to-sequence loss (TMA)
|
88 |
+
|
89 |
+
lambda_F0: 1. # F0 reconstruction loss
|
90 |
+
lambda_norm: 1. # norm reconstruction loss
|
91 |
+
lambda_dur: 1. # duration loss
|
92 |
+
lambda_ce: 20. # duration predictor probability output CE loss
|
93 |
+
lambda_sty: 1. # style reconstruction loss
|
94 |
+
lambda_diff: 1. # score matching loss
|
95 |
+
|
96 |
+
diff_epoch: 10 # style diffusion starting epoch
|
97 |
+
joint_epoch: 30 # joint training starting epoch
|
98 |
+
|
99 |
+
optimizer_params:
|
100 |
+
lr: 0.0001 # general learning rate
|
101 |
+
bert_lr: 0.00001 # learning rate for PLBERT
|
102 |
+
ft_lr: 0.0001 # learning rate for acoustic modules
|
103 |
+
|
104 |
+
slmadv_params:
|
105 |
+
min_len: 400 # minimum length of samples
|
106 |
+
max_len: 500 # maximum length of samples
|
107 |
+
batch_percentage: 0.5 # to prevent out of memory, only use half of the original batch size
|
108 |
+
iter: 10 # update the discriminator every this iterations of generator update
|
109 |
+
thresh: 5 # gradient norm above which the gradient is scaled
|
110 |
+
scale: 0.01 # gradient scaling factor for predictors from SLM discriminators
|
111 |
+
sig: 1.5 # sigma for differentiable duration modeling
|
112 |
+
|