Spaces:
Runtime error
Runtime error
kevinwang676
commited on
Commit
•
5a5ad75
1
Parent(s):
8b0db71
Update app.py
Browse files
app.py
CHANGED
@@ -53,10 +53,10 @@ with app:
|
|
53 |
gr.Markdown("### <center>🌟 - 3秒实时AI变声,支持中日英在内的所有语言!无需训练、一键变声!🍻 </center>")
|
54 |
gr.Markdown("### <center>🌊 - 更多精彩应用,敬请关注[滔滔AI](http://www.talktalkai.com);滔滔AI,为爱滔滔!💕</center>")
|
55 |
|
56 |
-
with gr.Row():
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
|
61 |
with gr.Column():
|
62 |
inp1 = gr.Audio(type="filepath", label="请上传AI变声的原音频(决定变声后的语音内容)")
|
@@ -64,7 +64,7 @@ with app:
|
|
64 |
btn1 = gr.Button("一键开启AI变声吧", variant="primary")
|
65 |
with gr.Column():
|
66 |
out1 = gr.Audio(type="filepath", label="AI变声后的专属音频")
|
67 |
-
btn_text.click(tts,
|
68 |
btn1.click(voice_change, [inp1, inp2], out1)
|
69 |
|
70 |
gr.Markdown("### <center>注意❗:请不要生成会对个人以及组织造成侵害的内容,此程序仅供科研、学习及个人娱乐使用。</center>")
|
|
|
53 |
gr.Markdown("### <center>🌟 - 3秒实时AI变声,支持中日英在内的所有语言!无需训练、一键变声!🍻 </center>")
|
54 |
gr.Markdown("### <center>🌊 - 更多精彩应用,敬请关注[滔滔AI](http://www.talktalkai.com);滔滔AI,为爱滔滔!💕</center>")
|
55 |
|
56 |
+
with gr.Row(variant='panel'):
|
57 |
+
api_key = gr.Textbox(type='password', label='OpenAI API Key', placeholder='Enter your API key to access the TTS demo')
|
58 |
+
model = gr.Dropdown(choices=['tts-1','tts-1-hd'], label='Model', value='tts-1')
|
59 |
+
voice = gr.Dropdown(choices=['alloy', 'echo', 'fable', 'onyx', 'nova', 'shimmer'], label='Voice Options', value='alloy')
|
60 |
|
61 |
with gr.Column():
|
62 |
inp1 = gr.Audio(type="filepath", label="请上传AI变声的原音频(决定变声后的语音内容)")
|
|
|
64 |
btn1 = gr.Button("一键开启AI变声吧", variant="primary")
|
65 |
with gr.Column():
|
66 |
out1 = gr.Audio(type="filepath", label="AI变声后的专属音频")
|
67 |
+
btn_text.click(tts, [text, model, voice, api_key], inp1)
|
68 |
btn1.click(voice_change, [inp1, inp2], out1)
|
69 |
|
70 |
gr.Markdown("### <center>注意❗:请不要生成会对个人以及组织造成侵害的内容,此程序仅供科研、学习及个人娱乐使用。</center>")
|