Spaces:
Sleeping
Sleeping
Upload Kiritan.py
Browse files- configs/Kiritan.py +56 -0
configs/Kiritan.py
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from pytorch_lightning.callbacks import LearningRateMonitor, ModelCheckpoint
|
2 |
+
|
3 |
+
_base_ = [
|
4 |
+
"./_base_/archs/hifi_svc.py",
|
5 |
+
"./_base_/trainers/base.py",
|
6 |
+
"./_base_/schedulers/exponential.py",
|
7 |
+
"./_base_/datasets/hifi_svc.py",
|
8 |
+
]
|
9 |
+
|
10 |
+
speaker_mapping = {
|
11 |
+
"kiritan": 0,
|
12 |
+
}
|
13 |
+
|
14 |
+
model = dict(
|
15 |
+
type="HiFiSVC",
|
16 |
+
speaker_encoder=dict(
|
17 |
+
input_size=len(speaker_mapping),
|
18 |
+
),
|
19 |
+
)
|
20 |
+
|
21 |
+
preprocessing = dict(
|
22 |
+
text_features_extractor=dict(
|
23 |
+
type="ContentVec",
|
24 |
+
),
|
25 |
+
pitch_extractor=dict(
|
26 |
+
type="ParselMouthPitchExtractor",
|
27 |
+
keep_zeros=False,
|
28 |
+
f0_min=40.0,
|
29 |
+
f0_max=1600.0,
|
30 |
+
),
|
31 |
+
energy_extractor=dict(
|
32 |
+
type="RMSEnergyExtractor",
|
33 |
+
),
|
34 |
+
augmentations=[
|
35 |
+
dict(
|
36 |
+
type="FixedPitchShifting",
|
37 |
+
key_shifts=[-5.0, 5.0],
|
38 |
+
probability=0.75,
|
39 |
+
),
|
40 |
+
],
|
41 |
+
)
|
42 |
+
|
43 |
+
trainer = dict(
|
44 |
+
# Disable gradient clipping, which is not supported by custom optimization
|
45 |
+
gradient_clip_val=None,
|
46 |
+
val_check_interval=1000,
|
47 |
+
check_val_every_n_epoch=None,
|
48 |
+
callbacks=[
|
49 |
+
ModelCheckpoint(
|
50 |
+
filename="{epoch}-{step}-{valid_loss:.2f}",
|
51 |
+
every_n_train_steps=1000,
|
52 |
+
save_top_k=-1,
|
53 |
+
),
|
54 |
+
LearningRateMonitor(logging_interval="step"),
|
55 |
+
],
|
56 |
+
)
|