Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
voice-clone
Commits
e718b3fd
Commit
e718b3fd
authored
Aug 01, 2024
by
chenpangpang
Browse files
feat: gradio页面显示为中文;优化启动器文字说明;更改gradio版本
parent
fd1d4227
Pipeline
#1461
failed with stages
in 0 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
23 deletions
+20
-23
voice-clone/app.py
voice-clone/app.py
+16
-20
voice-clone/requirements.txt
voice-clone/requirements.txt
+1
-1
启动器.ipynb
启动器.ipynb
+3
-2
No files found.
voice-clone/app.py
View file @
e718b3fd
...
...
@@ -16,33 +16,29 @@ def clone(text, audio, language):
iface
=
gr
.
Interface
(
fn
=
clone
,
inputs
=
[
gr
.
Textbox
(
label
=
'Text'
),
gr
.
Audio
(
type
=
'filepath'
,
label
=
'Voice reference audio file'
),
gr
.
Dropdown
(
label
=
'Language'
,
# choices=['en - English', 'fr - French', 'ar - Arabic', 'es - Spanish',
# 'zh - Chinese', 'ru - Russian', 'pt - Portuguese', 'it - Italian',
# 'de - German', 'nl - Dutch'])],
inputs
=
[
gr
.
Textbox
(
label
=
'文字'
),
gr
.
Audio
(
type
=
'filepath'
,
label
=
'参考语音'
),
gr
.
Dropdown
(
label
=
'语言'
,
choices
=
[
'en'
,
'es'
,
'fr'
,
'de'
,
'it'
,
'pt'
,
'pl'
,
'tr'
,
'ru'
,
'nl'
,
'cs'
,
'ar'
,
'zh-cn'
,
'hu'
,
'ko'
,
'ja'
,
'hi'
],
value
=
'zh-cn'
)],
outputs
=
gr
.
Audio
(
type
=
'filepath'
,
label
=
'
Generated audio file
'
),
title
=
'Voice Clone'
,
outputs
=
gr
.
Audio
(
type
=
'filepath'
,
label
=
'
生成语音
'
),
title
=
'Voice Clone
:语音克隆工具
'
,
allow_flagging
=
"never"
,
description
=
"""
by [Tony Assi](https://www.tonyassi.com/)
This space uses xtts_v2 model. Non-commercial use only. [Coqui Public Model License](https://coqui.ai/cpml)
Please ❤️ this Space. <a href="mailto: tony.assi.media@gmail.com">Email me</a>.
"""
,
theme
=
gr
.
themes
.
Base
(
primary_hue
=
"teal"
,
secondary_hue
=
"teal"
,
neutral_hue
=
"slate"
),
examples
=
[[
"Hey! It's me Dorthy, from the Wizard of Oz. Type in whatever you'd like me to say."
,
"./audio/Wizard-of-Oz-Dorthy.wav"
,
"en - English"
],
examples
=
[[
"前行必有曙光。"
,
"./audio/xiaozhan.wav"
,
"zh-cn"
],
[
"Hey! It's me Dorthy, from the Wizard of Oz. Type in whatever you'd like me to say."
,
"./audio/Wizard-of-Oz-Dorthy.wav"
,
"en"
],
[
"It's me Vito Corleone, from the Godfather. Type in whatever you'd like me to say."
,
"./audio/Godfather.wav"
,
"en
- English
"
],
"./audio/Godfather.wav"
,
"en"
],
[
"Hey, it's me Paris Hilton. Type in whatever you'd like me to say."
,
"./audio/Paris-Hilton.mp3"
,
"en
- English
"
],
"./audio/Paris-Hilton.mp3"
,
"en"
],
[
"Hey, it's me Megan Fox from Transformers. Type in whatever you'd like me to say."
,
"./audio/Megan-Fox.mp3"
,
"en
- English
"
],
"./audio/Megan-Fox.mp3"
,
"en"
],
[
"Hey there, it's me Jeff Goldblum. Type in whatever you'd like me to say."
,
"./audio/Jeff-Goldblum.mp3"
,
"en - English"
],
])
"./audio/Jeff-Goldblum.mp3"
,
"en"
],
[
"It's me Vito Corleone, from the Godfather. Type in whatever you'd like me to say."
,
"./audio/Godfather.wav"
,
"en"
]
])
iface
.
launch
(
server_name
=
'0.0.0.0'
,
share
=
True
)
voice-clone/requirements.txt
View file @
e718b3fd
TTS
torch
gradio==4.26.0
\ No newline at end of file
gradio==3.40.0
\ No newline at end of file
启动器.ipynb
View file @
e718b3fd
...
...
@@ -8,7 +8,7 @@
},
"source": [
"## 说明\n",
"- 启动需要加载模型,需要
1
分钟左右的时间\n",
"- 启动需要加载模型,需要
2
分钟左右的时间\n",
"- 启动和重启 Notebook 点上方工具栏中的「重启并运行所有单元格」。出现如下内容就算成功了:\n",
" - `Running on local URL: http://0.0.0.0:7860`\n",
" - `Running on public URL: https://xxxxxxxxxxxxxxx.gradio.live`\n",
...
...
@@ -18,7 +18,8 @@
"\n",
"## 功能介绍\n",
"- 原项目地址:https://huggingface.co/spaces/tonyassi/voice-clone/tree/main\n",
"- voice-clone:一款声音克隆工具,无需训练,仅需上传一段参考人声、文字即可生成语音。"
"- voice-clone:一款语音克隆工具,无需训练,仅需上传一段参考语音、文字即可生成语音。\n",
"- **注意:上传语音为无背景音乐的单人语音,否则会报错**"
]
},
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment