Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -26,7 +26,7 @@ def vc_fn(sid, input_audio, vc_transform, auto_f0,cluster_ratio, slice_db, noise
|
|
26 |
sampling_rate, audio = input_audio
|
27 |
# print(audio.shape,sampling_rate)
|
28 |
duration = audio.shape[0] / sampling_rate
|
29 |
-
if duration >
|
30 |
return "请上传小于100s的音频,需要转换长音频请本地进行转换", None
|
31 |
audio = (audio / np.iinfo(audio.dtype).max).astype(np.float32)
|
32 |
if len(audio.shape) > 1:
|
@@ -48,11 +48,11 @@ with app:
|
|
48 |
gr.Markdown(value="""
|
49 |
风又音理 sovits4.0 在线demo
|
50 |
|
51 |
-
此demo为被刀哭后所作 长音频请下载模型文件、config之后使用原仓库进行推理
|
52 |
""")
|
53 |
spks = list(model.spk2id.keys())
|
54 |
sid = gr.Dropdown(label="音色", choices=spks, value=spks[0])
|
55 |
-
vc_input3 = gr.Audio(label="
|
56 |
vc_transform = gr.Number(label="变调(整数,可以正负,半音数量,升高八度就是12)", value=0)
|
57 |
cluster_ratio = gr.Number(label="聚类模型混合比例,0-1之间,默认为0不启用聚类,能提升音色相似度,但会导致咬字下降(如果使用建议0.5左右)", value=0)
|
58 |
auto_f0 = gr.Checkbox(label="自动f0预测,配合聚类模型f0预测效果更好,会导致变调功能失效(仅限转换语音,歌声不要勾选此项会究极跑调)", value=False)
|
|
|
26 |
sampling_rate, audio = input_audio
|
27 |
# print(audio.shape,sampling_rate)
|
28 |
duration = audio.shape[0] / sampling_rate
|
29 |
+
if duration > 1000000000000:
|
30 |
return "请上传小于100s的音频,需要转换长音频请本地进行转换", None
|
31 |
audio = (audio / np.iinfo(audio.dtype).max).astype(np.float32)
|
32 |
if len(audio.shape) > 1:
|
|
|
48 |
gr.Markdown(value="""
|
49 |
风又音理 sovits4.0 在线demo
|
50 |
|
51 |
+
此demo为被刀哭后所作 时间限制已删除xwx 长音频请下载模型文件、config之后使用原仓库进行推理
|
52 |
""")
|
53 |
spks = list(model.spk2id.keys())
|
54 |
sid = gr.Dropdown(label="音色", choices=spks, value=spks[0])
|
55 |
+
vc_input3 = gr.Audio(label="上传音频")
|
56 |
vc_transform = gr.Number(label="变调(整数,可以正负,半音数量,升高八度就是12)", value=0)
|
57 |
cluster_ratio = gr.Number(label="聚类模型混合比例,0-1之间,默认为0不启用聚类,能提升音色相似度,但会导致咬字下降(如果使用建议0.5左右)", value=0)
|
58 |
auto_f0 = gr.Checkbox(label="自动f0预测,配合聚类模型f0预测效果更好,会导致变调功能失效(仅限转换语音,歌声不要勾选此项会究极跑调)", value=False)
|