Spaces:
Runtime error
Runtime error
RyaoChengfeng
commited on
Commit
·
12d7246
1
Parent(s):
52fee8b
add kei
Browse files- app.py +15 -0
- config.py +1 -1
- config/info.json +13 -0
- cuda_test.py +2 -0
- docker-compose.yml +1 -11
- pretrained_models/my-vits/kei/config.json +112 -0
- pretrained_models/my-vits/kei/cover.jpg +3 -0
- pretrained_models/my-vits/kei/kei.pth +3 -0
app.py
CHANGED
@@ -90,6 +90,13 @@ def change_lang(language):
|
|
90 |
else:
|
91 |
return 0.6, 0.668, 1
|
92 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
|
94 |
download_audio_js = """
|
95 |
() =>{{
|
@@ -196,6 +203,10 @@ if __name__ == '__main__':
|
|
196 |
if sid == -1 or sid < 0:
|
197 |
speaker = gr.Dropdown(label="Speaker", choices=speakers,
|
198 |
type="index", value=speakers[0])
|
|
|
|
|
|
|
|
|
199 |
else:
|
200 |
speaker = gr.Dropdown(label="Speaker", choices=speakers,
|
201 |
visible=False, type="index", value=speakers[sid])
|
@@ -272,6 +283,10 @@ if __name__ == '__main__':
|
|
272 |
if sid == -1 or sid < 0:
|
273 |
speaker = gr.Dropdown(label="Speaker", choices=speakers,
|
274 |
type="index", value=speakers[0])
|
|
|
|
|
|
|
|
|
275 |
else:
|
276 |
speaker = gr.Dropdown(label="Speaker", choices=speakers,
|
277 |
visible=False, type="index", value=speakers[sid])
|
|
|
90 |
else:
|
91 |
return 0.6, 0.668, 1
|
92 |
|
93 |
+
def search_speaker(search_value):
|
94 |
+
for s in speakers:
|
95 |
+
if search_value == s:
|
96 |
+
return s
|
97 |
+
for s in speakers:
|
98 |
+
if search_value in s:
|
99 |
+
return s
|
100 |
|
101 |
download_audio_js = """
|
102 |
() =>{{
|
|
|
203 |
if sid == -1 or sid < 0:
|
204 |
speaker = gr.Dropdown(label="Speaker", choices=speakers,
|
205 |
type="index", value=speakers[0])
|
206 |
+
with gr.Row():
|
207 |
+
search = gr.Textbox(label="Search Speaker", lines=1)
|
208 |
+
btn2 = gr.Button(value="Search")
|
209 |
+
btn2.click(search_speaker, inputs=[search], outputs=[speaker])
|
210 |
else:
|
211 |
speaker = gr.Dropdown(label="Speaker", choices=speakers,
|
212 |
visible=False, type="index", value=speakers[sid])
|
|
|
283 |
if sid == -1 or sid < 0:
|
284 |
speaker = gr.Dropdown(label="Speaker", choices=speakers,
|
285 |
type="index", value=speakers[0])
|
286 |
+
with gr.Row():
|
287 |
+
search = gr.Textbox(label="Search Speaker", lines=1)
|
288 |
+
btn2 = gr.Button(value="Search")
|
289 |
+
btn2.click(search_speaker, inputs=[search], outputs=[speaker])
|
290 |
else:
|
291 |
speaker = gr.Dropdown(label="Speaker", choices=speakers,
|
292 |
visible=False, type="index", value=speakers[sid])
|
config.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
categories = ["
|
2 |
|
3 |
categories_all = ["Honkai: Star Rail", "Blue Archive", "Lycoris Recoil", "Princess Connect! Re:Dive",
|
4 |
"Genshin Impact", "Honkai Impact 3rd", "Overwatch 2", "GalGame", "vits uma genshin", "moe tts"]
|
|
|
1 |
+
categories = ["GalGame"]
|
2 |
|
3 |
categories_all = ["Honkai: Star Rail", "Blue Archive", "Lycoris Recoil", "Princess Connect! Re:Dive",
|
4 |
"Genshin Impact", "Honkai Impact 3rd", "Overwatch 2", "GalGame", "vits uma genshin", "moe tts"]
|
config/info.json
CHANGED
@@ -506,6 +506,19 @@
|
|
506 |
"config_path": "./pretrained_models/my-vits/natsume_ai/config.json",
|
507 |
"model_path": "./pretrained_models/my-vits/natsume_ai/natsume_ai.pth"
|
508 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
509 |
"genshin": {
|
510 |
"enable": true,
|
511 |
"name_en": "Genshin Impact",
|
|
|
506 |
"config_path": "./pretrained_models/my-vits/natsume_ai/config.json",
|
507 |
"model_path": "./pretrained_models/my-vits/natsume_ai/natsume_ai.pth"
|
508 |
},
|
509 |
+
"kei": {
|
510 |
+
"enable": true,
|
511 |
+
"name_en": "Natsume Kei",
|
512 |
+
"name_zh": "夏目圭",
|
513 |
+
"title": "GalGame-夏目圭",
|
514 |
+
"cover": "./pretrained_models/my-vits/kei/cover.jpg",
|
515 |
+
"sid": 0,
|
516 |
+
"example": "こんにちは。",
|
517 |
+
"language": "Japanese",
|
518 |
+
"type": "multi",
|
519 |
+
"config_path": "./pretrained_models/my-vits/kei/config.json",
|
520 |
+
"model_path": "./pretrained_models/my-vits/kei/kei.pth"
|
521 |
+
},
|
522 |
"genshin": {
|
523 |
"enable": true,
|
524 |
"name_en": "Genshin Impact",
|
cuda_test.py
CHANGED
@@ -2,6 +2,8 @@ import torch
|
|
2 |
|
3 |
|
4 |
if __name__ == "__main__":
|
|
|
|
|
5 |
device_count = torch.cuda.device_count()
|
6 |
|
7 |
if device_count > 0:
|
|
|
2 |
|
3 |
|
4 |
if __name__ == "__main__":
|
5 |
+
print(torch.cuda.is_available())
|
6 |
+
|
7 |
device_count = torch.cuda.device_count()
|
8 |
|
9 |
if device_count > 0:
|
docker-compose.yml
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
version:
|
2 |
services:
|
3 |
vits:
|
4 |
image: vits-moe:latest
|
@@ -13,14 +13,6 @@ services:
|
|
13 |
- ./config.py:/app/config.py
|
14 |
- ./cuda_test.py:/app/cuda_test.py
|
15 |
- ./entrypoint.sh:/app/entrypoint.sh
|
16 |
-
- /opt/cuda/lib64:/usr/local/cuda/lib64
|
17 |
-
- /opt/cuda/include:/usr/local/cuda/include
|
18 |
-
command: |
|
19 |
-
/bin/sh -c "
|
20 |
-
if ! python -c 'import torch; print(torch.cuda.is_available())'; then
|
21 |
-
echo 'CUDA is not available'
|
22 |
-
exit 0
|
23 |
-
fi"
|
24 |
deploy:
|
25 |
resources:
|
26 |
reservations:
|
@@ -28,5 +20,3 @@ services:
|
|
28 |
- driver: nvidia
|
29 |
count: 1
|
30 |
capabilities: [gpu]
|
31 |
-
|
32 |
-
|
|
|
1 |
+
version: "3"
|
2 |
services:
|
3 |
vits:
|
4 |
image: vits-moe:latest
|
|
|
13 |
- ./config.py:/app/config.py
|
14 |
- ./cuda_test.py:/app/cuda_test.py
|
15 |
- ./entrypoint.sh:/app/entrypoint.sh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
deploy:
|
17 |
resources:
|
18 |
reservations:
|
|
|
20 |
- driver: nvidia
|
21 |
count: 1
|
22 |
capabilities: [gpu]
|
|
|
|
pretrained_models/my-vits/kei/config.json
ADDED
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"train": {
|
3 |
+
"log_interval": 10,
|
4 |
+
"eval_interval": 100,
|
5 |
+
"seed": 1234,
|
6 |
+
"epochs": 10000,
|
7 |
+
"learning_rate": 0.0002,
|
8 |
+
"betas": [0.8, 0.99],
|
9 |
+
"eps": 1e-9,
|
10 |
+
"batch_size": 16,
|
11 |
+
"fp16_run": true,
|
12 |
+
"lr_decay": 0.999875,
|
13 |
+
"segment_size": 8192,
|
14 |
+
"init_lr_ratio": 1,
|
15 |
+
"warmup_epochs": 0,
|
16 |
+
"c_mel": 45,
|
17 |
+
"c_kl": 1.0
|
18 |
+
},
|
19 |
+
"data": {
|
20 |
+
"training_files": "final_annotation_train.txt",
|
21 |
+
"validation_files": "final_annotation_val.txt",
|
22 |
+
"text_cleaners": ["zh_ja_mixture_cleaners"],
|
23 |
+
"max_wav_value": 32768.0,
|
24 |
+
"sampling_rate": 22050,
|
25 |
+
"filter_length": 1024,
|
26 |
+
"hop_length": 256,
|
27 |
+
"win_length": 1024,
|
28 |
+
"n_mel_channels": 80,
|
29 |
+
"mel_fmin": 0.0,
|
30 |
+
"mel_fmax": null,
|
31 |
+
"add_blank": true,
|
32 |
+
"n_speakers": 3,
|
33 |
+
"cleaned_text": true
|
34 |
+
},
|
35 |
+
"model": {
|
36 |
+
"inter_channels": 192,
|
37 |
+
"hidden_channels": 192,
|
38 |
+
"filter_channels": 768,
|
39 |
+
"n_heads": 2,
|
40 |
+
"n_layers": 6,
|
41 |
+
"kernel_size": 3,
|
42 |
+
"p_dropout": 0.1,
|
43 |
+
"resblock": "1",
|
44 |
+
"resblock_kernel_sizes": [3, 7, 11],
|
45 |
+
"resblock_dilation_sizes": [
|
46 |
+
[1, 3, 5],
|
47 |
+
[1, 3, 5],
|
48 |
+
[1, 3, 5]
|
49 |
+
],
|
50 |
+
"upsample_rates": [8, 8, 2, 2],
|
51 |
+
"upsample_initial_channel": 512,
|
52 |
+
"upsample_kernel_sizes": [16, 16, 4, 4],
|
53 |
+
"n_layers_q": 3,
|
54 |
+
"use_spectral_norm": false,
|
55 |
+
"gin_channels": 256
|
56 |
+
},
|
57 |
+
"speakers": ["kei", "specialweek", "zhongli"],
|
58 |
+
"symbols": [
|
59 |
+
"_",
|
60 |
+
",",
|
61 |
+
".",
|
62 |
+
"!",
|
63 |
+
"?",
|
64 |
+
"-",
|
65 |
+
"~",
|
66 |
+
"\u2026",
|
67 |
+
"A",
|
68 |
+
"E",
|
69 |
+
"I",
|
70 |
+
"N",
|
71 |
+
"O",
|
72 |
+
"Q",
|
73 |
+
"U",
|
74 |
+
"a",
|
75 |
+
"b",
|
76 |
+
"d",
|
77 |
+
"e",
|
78 |
+
"f",
|
79 |
+
"g",
|
80 |
+
"h",
|
81 |
+
"i",
|
82 |
+
"j",
|
83 |
+
"k",
|
84 |
+
"l",
|
85 |
+
"m",
|
86 |
+
"n",
|
87 |
+
"o",
|
88 |
+
"p",
|
89 |
+
"r",
|
90 |
+
"s",
|
91 |
+
"t",
|
92 |
+
"u",
|
93 |
+
"v",
|
94 |
+
"w",
|
95 |
+
"y",
|
96 |
+
"z",
|
97 |
+
"\u0283",
|
98 |
+
"\u02a7",
|
99 |
+
"\u02a6",
|
100 |
+
"\u026f",
|
101 |
+
"\u0279",
|
102 |
+
"\u0259",
|
103 |
+
"\u0265",
|
104 |
+
"\u207c",
|
105 |
+
"\u02b0",
|
106 |
+
"`",
|
107 |
+
"\u2192",
|
108 |
+
"\u2193",
|
109 |
+
"\u2191",
|
110 |
+
" "
|
111 |
+
]
|
112 |
+
}
|
pretrained_models/my-vits/kei/cover.jpg
ADDED
Git LFS Details
|
pretrained_models/my-vits/kei/kei.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2f67b35330570f5d69244aefec23ddcbf9af89fe55836d0c04a20f487dbac01a
|
3 |
+
size 158899433
|