Spaces:
Running
Running
MarcusSu1216
commited on
Commit
•
9847bf2
1
Parent(s):
ae27dff
Update app.py
Browse files
app.py
CHANGED
@@ -25,7 +25,7 @@ def vc_fn(sid, input_audio, vc_transform, auto_f0,cluster_ratio, noise_scale):
|
|
25 |
# print(audio.shape,sampling_rate)
|
26 |
duration = audio.shape[0] / sampling_rate
|
27 |
if duration > 45:
|
28 |
-
return "请上传小于
|
29 |
audio = (audio / np.iinfo(audio.dtype).max).astype(np.float32)
|
30 |
if len(audio.shape) > 1:
|
31 |
audio = librosa.to_mono(audio.transpose(1, 0))
|
@@ -40,7 +40,7 @@ def vc_fn(sid, input_audio, vc_transform, auto_f0,cluster_ratio, noise_scale):
|
|
40 |
auto_predict_f0=auto_f0,
|
41 |
noice_scale=noise_scale
|
42 |
)
|
43 |
-
return "
|
44 |
|
45 |
|
46 |
app = gr.Blocks()
|
@@ -48,16 +48,20 @@ with app:
|
|
48 |
with gr.Tabs():
|
49 |
with gr.TabItem("Basic"):
|
50 |
gr.Markdown(value="""
|
51 |
-
星瞳_Official
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
|
|
|
|
|
|
|
|
61 |
""")
|
62 |
spks = list(model.spk2id.keys())
|
63 |
sid = gr.Dropdown(label="音色", choices=["XT3.0"], value="XT3.0")
|
|
|
25 |
# print(audio.shape,sampling_rate)
|
26 |
duration = audio.shape[0] / sampling_rate
|
27 |
if duration > 45:
|
28 |
+
return "请上传小于100s的音频,需要转换长音频请本地进行转换", None
|
29 |
audio = (audio / np.iinfo(audio.dtype).max).astype(np.float32)
|
30 |
if len(audio.shape) > 1:
|
31 |
audio = librosa.to_mono(audio.transpose(1, 0))
|
|
|
40 |
auto_predict_f0=auto_f0,
|
41 |
noice_scale=noise_scale
|
42 |
)
|
43 |
+
return "转换完成", (44100, out_audio.numpy())
|
44 |
|
45 |
|
46 |
app = gr.Blocks()
|
|
|
48 |
with gr.Tabs():
|
49 |
with gr.TabItem("Basic"):
|
50 |
gr.Markdown(value="""
|
51 |
+
星瞳_Official的语音在线合成,基于so-vits-svc-4.0生成
|
52 |
+
|
53 |
+
使用须知:。
|
54 |
+
1、请使用伴奏和声去除干净的人声素材,时长小于100秒,格式为mp3或wav。
|
55 |
+
2、去除伴奏推荐使用UVR5软件,B站上有详细教程。
|
56 |
+
3、条件不支持推荐使用以下几个去伴奏的网站:
|
57 |
+
https://vocalremover.org/zh/
|
58 |
+
https://tuanziai.com/vocal-remover/upload
|
59 |
+
https://www.lalal.ai/zh-hans/
|
60 |
+
4、在线版服务器为2核16G免费版,转换效率较慢请耐心等待。
|
61 |
+
5、使用此模型请标注作者:一闪一闪小星瞳,以及该项目地址。
|
62 |
+
6、有问题可以在B站私聊我反馈:https://space.bilibili.com/38523418
|
63 |
+
7、语音模型转换出的音频请勿用于商业化。
|
64 |
+
|
65 |
""")
|
66 |
spks = list(model.spk2id.keys())
|
67 |
sid = gr.Dropdown(label="音色", choices=["XT3.0"], value="XT3.0")
|