Mahiruoshi
commited on
Commit
•
9f9bb9f
1
Parent(s):
585e28a
Update app.py
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ class VitsGradio:
|
|
18 |
def __init__(self):
|
19 |
self.dev = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
20 |
self.lan = ["中文","日文","自动","手动"]
|
21 |
-
self.idols = ["歩夢","かすみ","しずく","果林","愛","せつ菜","璃奈","栞子","エマ","ランジュ","ミア","派蒙"]
|
22 |
self.modelPaths = []
|
23 |
for root,dirs,files in os.walk("checkpoints"):
|
24 |
for dir in dirs:
|
@@ -151,6 +151,18 @@ class VitsGradio:
|
|
151 |
elif speaker == "派蒙":
|
152 |
spk = 16
|
153 |
return spk
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
154 |
|
155 |
def sle(self,language,text):
|
156 |
text = text.replace('\n','。').replace(' ',',')
|
|
|
18 |
def __init__(self):
|
19 |
self.dev = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
20 |
self.lan = ["中文","日文","自动","手动"]
|
21 |
+
self.idols = ["歩夢","かすみ","しずく","果林","愛","せつ菜","璃奈","栞子","エマ","ランジュ","ミア","派蒙","华恋","真昼","天堂","双叶"]
|
22 |
self.modelPaths = []
|
23 |
for root,dirs,files in os.walk("checkpoints"):
|
24 |
for dir in dirs:
|
|
|
151 |
elif speaker == "派蒙":
|
152 |
spk = 16
|
153 |
return spk
|
154 |
+
elif speaker == "华恋":
|
155 |
+
spk = 21
|
156 |
+
return spk
|
157 |
+
elif speaker == "真昼":
|
158 |
+
spk = 20
|
159 |
+
return spk
|
160 |
+
elif speaker == "天堂":
|
161 |
+
spk = 22
|
162 |
+
return spk
|
163 |
+
elif speaker == "双叶":
|
164 |
+
spk = 23
|
165 |
+
return spk
|
166 |
|
167 |
def sle(self,language,text):
|
168 |
text = text.replace('\n','。').replace(' ',',')
|