Spaces:
Runtime error
Runtime error
lengyue233
commited on
Commit
•
60d41a0
1
Parent(s):
2025325
Add application file
Browse files- Dockerfile +7 -0
- exp_hifisinger.py +40 -0
Dockerfile
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM lengyue233/fish-diffusion:latest
|
2 |
+
|
3 |
+
WORKDIR /root/fish-diffusion
|
4 |
+
COPY checkpoint.ckpt checkpoints/checkpoint.ckpt
|
5 |
+
COPY exp_hifisinger.py configs/exp_hifisinger.py
|
6 |
+
|
7 |
+
RUN python tools/hifisinger/inference.py --config configs/exp_hifisinger.py --checkpoint checkpoints/checkpoint.ckpt --speaker opencpop --max_slice_duration 120 --min_silence_duration 2 --gradio
|
exp_hifisinger.py
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_base_ = [
|
2 |
+
"./_base_/archs/hifi_svc.py",
|
3 |
+
"./_base_/schedulers/exponential.py",
|
4 |
+
]
|
5 |
+
|
6 |
+
speaker_mapping = {'DELETED0': 0, 'opencpop': 1, 'DELETED2': 2, 'DELETED3': 3, 'M4Singer-Alto-7': 4, 'M4Singer-Alto-1': 5, 'M4Singer-Alto-5': 6, 'M4Singer-Tenor-5': 7, 'M4Singer-Alto-2': 8, 'M4Singer-Tenor-7': 9, 'M4Singer-Tenor-4': 10, 'M4Singer-Alto-6': 11, 'M4Singer-Soprano-3': 12, 'M4Singer-Bass-1': 13, 'M4Singer-Bass-3': 14, 'M4Singer-Tenor-2': 15, 'M4Singer-Alto-3': 16, 'M4Singer-Tenor-6': 17, 'M4Singer-Bass-2': 18, 'M4Singer-Alto-4': 19, 'M4Singer-Soprano-2': 20, 'M4Singer-Soprano-1': 21, 'M4Singer-Alto-2#forever': 22, 'M4Singer-Tenor-3': 23, 'M4Singer-Tenor-1': 24, 'M4Singer-Tenor-1#always': 25}
|
7 |
+
|
8 |
+
model = dict(
|
9 |
+
type="HiFiSVC",
|
10 |
+
speaker_encoder=dict(
|
11 |
+
input_size=len(speaker_mapping),
|
12 |
+
),
|
13 |
+
)
|
14 |
+
|
15 |
+
preprocessing = dict(
|
16 |
+
text_features_extractor=dict(
|
17 |
+
type="ContentVec",
|
18 |
+
),
|
19 |
+
pitch_extractor=dict(
|
20 |
+
type="ParselMouthPitchExtractor",
|
21 |
+
keep_zeros=False,
|
22 |
+
f0_min=40.0,
|
23 |
+
f0_max=1600.0,
|
24 |
+
),
|
25 |
+
energy_extractor=dict(
|
26 |
+
type="RMSEnergyExtractor",
|
27 |
+
),
|
28 |
+
augmentations=[
|
29 |
+
dict(
|
30 |
+
type="RandomPitchShifting",
|
31 |
+
key_shifts=[-5., 5.],
|
32 |
+
probability=1.5,
|
33 |
+
),
|
34 |
+
dict(
|
35 |
+
type="RandomTimeStretching",
|
36 |
+
factors=[0.8, 1.2],
|
37 |
+
probability=0.75,
|
38 |
+
)
|
39 |
+
],
|
40 |
+
)
|