Mahiruoshi
commited on
Commit
•
58dd714
1
Parent(s):
a38ff35
Update app.py
Browse files
app.py
CHANGED
@@ -107,13 +107,14 @@ def extrac(text):
|
|
107 |
if len(i)>1:
|
108 |
if len(i) > 20:
|
109 |
try:
|
110 |
-
cur_list = re.split(r'
|
111 |
for i in cur_list:
|
112 |
if len(i)>1:
|
113 |
final_list.append(i+'。')
|
114 |
except:
|
115 |
pass
|
116 |
-
|
|
|
117 |
final_list = [x for x in final_list if x != '']
|
118 |
print(final_list)
|
119 |
return final_list
|
@@ -163,7 +164,7 @@ with app:
|
|
163 |
|
164 |
with gr.TabItem("虹团vits模型,现可按句分割实现长文本合成,可自行用export_to_onnx.py导出"):
|
165 |
|
166 |
-
tts_input1 = gr.TextArea(label="去标贝新模型,老版本在lovelive文件夹中", value="
|
167 |
language = gr.Dropdown(label="选择语言,目前勉强可以做到自动识别",choices=lan, value="自动", interactive=True)
|
168 |
para_input1 = gr.Slider(minimum= 0.01,maximum=1.0,label="更改噪声比例,以控制情感", value=0.667)
|
169 |
para_input2 = gr.Slider(minimum= 0.01,maximum=1.0,label="更改噪声偏差,以控制音素长短", value=0.7)
|
|
|
107 |
if len(i)>1:
|
108 |
if len(i) > 20:
|
109 |
try:
|
110 |
+
cur_list = re.split(r'。|!|?|:|:|?|.', i)
|
111 |
for i in cur_list:
|
112 |
if len(i)>1:
|
113 |
final_list.append(i+'。')
|
114 |
except:
|
115 |
pass
|
116 |
+
else:
|
117 |
+
final_list.append(i)
|
118 |
final_list = [x for x in final_list if x != '']
|
119 |
print(final_list)
|
120 |
return final_list
|
|
|
164 |
|
165 |
with gr.TabItem("虹团vits模型,现可按句分割实现长文本合成,可自行用export_to_onnx.py导出"):
|
166 |
|
167 |
+
tts_input1 = gr.TextArea(label="去标贝新模型,老版本在lovelive文件夹中", value="为什么你会那么熟练啊?你和雪菜亲过多少次了?我只想做只属于你一个人的学院偶像,所有,请只注视我一个人,好吗?【中文】\nなんでそんなに慣れてんだよっ?せつ菜と…何回キスしたんだよ?どこまであたしを置いてきぼりにすれば気が済むんだよ?[日文]\nI can't choose just one(English)")
|
168 |
language = gr.Dropdown(label="选择语言,目前勉强可以做到自动识别",choices=lan, value="自动", interactive=True)
|
169 |
para_input1 = gr.Slider(minimum= 0.01,maximum=1.0,label="更改噪声比例,以控制情感", value=0.667)
|
170 |
para_input2 = gr.Slider(minimum= 0.01,maximum=1.0,label="更改噪声偏差,以控制音素长短", value=0.7)
|