Spaces:
Runtime error
Runtime error
Commit
·
ce530e5
1
Parent(s):
0c81c46
Update app.py
Browse files
app.py
CHANGED
|
@@ -184,33 +184,23 @@ def predict(prompt, language, audio_file_pth, mic_file_path, use_mic, voice_clea
|
|
| 184 |
)
|
| 185 |
|
| 186 |
|
| 187 |
-
title = "
|
| 188 |
|
| 189 |
description = """
|
| 190 |
-
|
| 191 |
<br/>
|
| 192 |
-
|
| 193 |
-
<br/>
|
| 194 |
-
This is the same model that powers our creator application <a href="https://coqui.ai">Coqui Studio</a> as well as the <a href="https://docs.coqui.ai">Coqui API</a>. In production we apply modifications to make low-latency streaming possible.
|
| 195 |
-
<br/>
|
| 196 |
-
Leave a star on the Github <a href="https://github.com/coqui-ai/TTS">🐸TTS</a>, where our open-source inference and training code lives.
|
| 197 |
-
<br/>
|
| 198 |
-
<p>For faster inference without waiting in the queue, you should duplicate this space and upgrade to GPU via the settings.
|
| 199 |
-
<br/>
|
| 200 |
-
<a href="https://huggingface.co/spaces/coqui/xtts?duplicate=true">
|
| 201 |
-
<img style="margin-top: 0em; margin-bottom: 0em" src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a>
|
| 202 |
-
</p>
|
| 203 |
-
<p>Language Selectors:
|
| 204 |
-
Arabic: ar, Brazilian Portuguese: pt , Chinese: zh-cn, Czech: cs,<br/>
|
| 205 |
-
Dutch: nl, English: en, French: fr, Italian: it, Polish: pl,<br/>
|
| 206 |
-
Russian: ru, Spanish: es, Turkish: tr <br/>
|
| 207 |
-
</p>
|
| 208 |
-
<img referrerpolicy="no-referrer-when-downgrade" src="https://static.scarf.sh/a.png?x-pxid=f3d15adf-0944-4cf3-ba8c-9c9a6862759c" />
|
| 209 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 210 |
|
| 211 |
article = """
|
| 212 |
<div style='margin:20px auto;'>
|
| 213 |
-
<p
|
|
|
|
| 214 |
</div>
|
| 215 |
"""
|
| 216 |
examples = [
|
|
@@ -344,13 +334,10 @@ gr.Interface(
|
|
| 344 |
fn=predict,
|
| 345 |
inputs=[
|
| 346 |
gr.Textbox(
|
| 347 |
-
label="
|
| 348 |
-
info="One or two sentences at a time is better. Up to 200 text characters.",
|
| 349 |
-
value="Hi there, I'm your new voice clone. Try your best to upload quality audio",
|
| 350 |
),
|
| 351 |
gr.Dropdown(
|
| 352 |
-
label="
|
| 353 |
-
info="Select an output language for the synthesised speech",
|
| 354 |
choices=[
|
| 355 |
"en",
|
| 356 |
"es",
|
|
@@ -367,32 +354,31 @@ gr.Interface(
|
|
| 367 |
"zh-cn",
|
| 368 |
],
|
| 369 |
max_choices=1,
|
| 370 |
-
value="
|
| 371 |
),
|
| 372 |
gr.Audio(
|
| 373 |
-
label="
|
| 374 |
-
info="Click on the ✎ button to upload your own target speaker audio",
|
| 375 |
type="filepath",
|
| 376 |
value="examples/female.wav",
|
| 377 |
),
|
| 378 |
gr.Audio(source="microphone",
|
| 379 |
type="filepath",
|
| 380 |
-
|
| 381 |
-
|
| 382 |
-
gr.Checkbox(label="Use Microphone",
|
| 383 |
value=False,
|
| 384 |
-
info="
|
| 385 |
-
gr.Checkbox(label="
|
| 386 |
value=False,
|
| 387 |
-
info="
|
| 388 |
),
|
| 389 |
gr.Checkbox(label="Do not use language auto-detect",
|
| 390 |
value=False,
|
|
|
|
| 391 |
info="Check to disable language auto-detection",),
|
| 392 |
gr.Checkbox(
|
| 393 |
-
label="
|
| 394 |
-
value=
|
| 395 |
-
info="
|
| 396 |
),
|
| 397 |
|
| 398 |
|
|
|
|
| 184 |
)
|
| 185 |
|
| 186 |
|
| 187 |
+
title = "🐸 XTTS - 3秒语音合成,支持中英双语,一键声音克隆,告别电音!"
|
| 188 |
|
| 189 |
description = """
|
| 190 |
+
Powered by [Coqui AI](https://coqui.ai/)
|
| 191 |
<br/>
|
| 192 |
+
更多精彩
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 193 |
"""
|
| 194 |
+
description = f"""
|
| 195 |
+
## <center>🌟 - 支持13种语言,中文能力极大增强!Powered by [Coqui AI](https://coqui.ai/)</center>
|
| 196 |
+
### <center>🌊 - 更多精彩应用,尽在[滔滔AI](http://www.talktalkai.com);滔滔AI,为爱滔滔!💕</center>
|
| 197 |
+
""".strip()
|
| 198 |
+
|
| 199 |
|
| 200 |
article = """
|
| 201 |
<div style='margin:20px auto;'>
|
| 202 |
+
<p>注意❗:请不要生成会对个人以及组织造成侵害的内容,此程序仅供科研、学习及个人娱乐使用。</p>
|
| 203 |
+
<p>🌊🏞️🎶 - 江水东流急,滔滔无尽声。 明·顾璘</p>
|
| 204 |
</div>
|
| 205 |
"""
|
| 206 |
examples = [
|
|
|
|
| 334 |
fn=predict,
|
| 335 |
inputs=[
|
| 336 |
gr.Textbox(
|
| 337 |
+
label="想要合成的文本内容",
|
|
|
|
|
|
|
| 338 |
),
|
| 339 |
gr.Dropdown(
|
| 340 |
+
label="请选择文本内容对应的语言",
|
|
|
|
| 341 |
choices=[
|
| 342 |
"en",
|
| 343 |
"es",
|
|
|
|
| 354 |
"zh-cn",
|
| 355 |
],
|
| 356 |
max_choices=1,
|
| 357 |
+
value="zh-cn",
|
| 358 |
),
|
| 359 |
gr.Audio(
|
| 360 |
+
label="通过文件上传语音",
|
|
|
|
| 361 |
type="filepath",
|
| 362 |
value="examples/female.wav",
|
| 363 |
),
|
| 364 |
gr.Audio(source="microphone",
|
| 365 |
type="filepath",
|
| 366 |
+
label="使用麦克风上传语音"),
|
| 367 |
+
gr.Checkbox(label="是否使用麦克风上传语音",
|
|
|
|
| 368 |
value=False,
|
| 369 |
+
info="默认为否",),
|
| 370 |
+
gr.Checkbox(label="是否需要去除背景音",
|
| 371 |
value=False,
|
| 372 |
+
info="默认为否",
|
| 373 |
),
|
| 374 |
gr.Checkbox(label="Do not use language auto-detect",
|
| 375 |
value=False,
|
| 376 |
+
visible=False,
|
| 377 |
info="Check to disable language auto-detection",),
|
| 378 |
gr.Checkbox(
|
| 379 |
+
label="使用条款",
|
| 380 |
+
value=True,
|
| 381 |
+
info="我承诺:不会利用此程序生成对个人或组织造成侵害的任何内容",
|
| 382 |
),
|
| 383 |
|
| 384 |
|