Spaces:
Build error
Build error
...
Browse files
app.py
CHANGED
@@ -73,7 +73,7 @@ character_dict = {
|
|
73 |
|
74 |
load_model(config_path, pth_path)
|
75 |
|
76 |
-
app = gr.Blocks()
|
77 |
with app:
|
78 |
gr.HTML("""
|
79 |
<div
|
@@ -97,7 +97,7 @@ with app:
|
|
97 |
with gr.Row():
|
98 |
tts_input1 = gr.TextArea(
|
99 |
label="请输入文本(仅支持日语)", value="你好,世界!")
|
100 |
-
tts_input2 = gr.Dropdown([character_dict.keys], type="value",label="选择角色"
|
101 |
tts_submit = gr.Button("用文本合成", variant="primary")
|
102 |
tts_output2 = gr.Audio(label="Output")
|
103 |
# model_submit.click(load_model, [config_path, pth_path])
|
@@ -109,4 +109,33 @@ with app:
|
|
109 |
使用本项目模型直接或间接生成的音频,必须声明由AI技术或VITS技术合成
|
110 |
</div>
|
111 |
""")
|
112 |
-
app.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
|
74 |
load_model(config_path, pth_path)
|
75 |
|
76 |
+
'''app = gr.Blocks()
|
77 |
with app:
|
78 |
gr.HTML("""
|
79 |
<div
|
|
|
97 |
with gr.Row():
|
98 |
tts_input1 = gr.TextArea(
|
99 |
label="请输入文本(仅支持日语)", value="你好,世界!")
|
100 |
+
tts_input2 = gr.Dropdown([character_dict.keys], type="value",label="选择角色")
|
101 |
tts_submit = gr.Button("用文本合成", variant="primary")
|
102 |
tts_output2 = gr.Audio(label="Output")
|
103 |
# model_submit.click(load_model, [config_path, pth_path])
|
|
|
109 |
使用本项目模型直接或间接生成的音频,必须声明由AI技术或VITS技术合成
|
110 |
</div>
|
111 |
""")
|
112 |
+
app.launch()'''
|
113 |
+
|
114 |
+
gr.HTML("""
|
115 |
+
<div
|
116 |
+
style="width: 100%;padding-top:116px;background-image: url('https://huggingface.co/spaces/tumuyan/vits-miki/resolve/main/bg.webp');;background-size:cover">
|
117 |
+
<div>
|
118 |
+
<div>
|
119 |
+
<h4 class="h-sign" style="font-size: 12px;">
|
120 |
+
这是一个使用<a href="https://github.com/thesupersonic16/DALTools" target="_blank">thesupersonic16/DALTools</a>提供的解包音频作为数据集,
|
121 |
+
使用<a href="https://github.com/jaywalnut310/vits" target="_blank">VITS</a>技术训练的语音合成demo。
|
122 |
+
</h4>
|
123 |
+
</div>
|
124 |
+
</div>
|
125 |
+
</div>
|
126 |
+
""")
|
127 |
+
|
128 |
+
demo = gr.Interface(
|
129 |
+
fn=infer,
|
130 |
+
inputs=[gr.Dropdown([character_dict.keys], type="value",label="选择角色"), gr.TextArea(label="请输入文本(仅支持日语)", value="你好,世界!")],
|
131 |
+
outputs=[gr.Audio(label="Output")],
|
132 |
+
)
|
133 |
+
demo.launch()
|
134 |
+
|
135 |
+
gr.HTML("""
|
136 |
+
<div style="text-align:center">
|
137 |
+
仅供学习交流,不可用于商业或非法用途
|
138 |
+
<br/>
|
139 |
+
使用本项目模型直接或间接生成的音频,必须声明由AI技术或VITS技术合成
|
140 |
+
</div>
|
141 |
+
""")
|