Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,14 +14,18 @@ def clone(text, audio):
|
|
| 14 |
tts.tts_to_file(text=text, speaker_wav=audio, language="zh-cn", file_path="./output.wav")
|
| 15 |
return "./output.wav"
|
| 16 |
|
| 17 |
-
iface = gr.Interface(
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
iface.launch()
|
|
|
|
| 14 |
tts.tts_to_file(text=text, speaker_wav=audio, language="zh-cn", file_path="./output.wav")
|
| 15 |
return "./output.wav"
|
| 16 |
|
| 17 |
+
iface = gr.Interface(
|
| 18 |
+
fn=clone,
|
| 19 |
+
inputs=[
|
| 20 |
+
gr.Textbox(label='Text'),
|
| 21 |
+
gr.Audio(type='filepath', label='Voice reference audio file')
|
| 22 |
+
],
|
| 23 |
+
outputs=gr.Audio(type='filepath'),
|
| 24 |
+
title='Voice Clone',
|
| 25 |
+
description="CoolAI",
|
| 26 |
+
theme=gr.themes.Monochrome(),
|
| 27 |
+
examples=[
|
| 28 |
+
["我不敢苟同他的观点,我个人认为这个意大利面就应该拌42号混凝土,因为这个螺丝钉的长度,它很容易会直接影响到挖掘机的扭矩,你知道吧。你往里砸的时候,一瞬间它就会产生大量的高能蛋白,俗称UFO,会严重影响经济的发展,甚至对这个太平洋以及充电器都会造成一定的核污染。", "./audio/Eric.MP3"],
|
| 29 |
+
]
|
| 30 |
+
)
|
| 31 |
iface.launch()
|