kevinwang676 commited on
Commit
6cda5b5
1 Parent(s): 6865a2f

Update app_multi.py

Browse files
Files changed (1) hide show
  1. app_multi.py +14 -0
app_multi.py CHANGED
@@ -733,6 +733,20 @@ with app:
733
  "</center>")
734
  gr.Markdown("### <center>🌊 - 身临其境般的AI音乐体验,AI歌手“想把我唱给你听”;Powered by [RVC-Project](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI)</center>")
735
  gr.Markdown("### <center>更多精彩应用,敬请关注[滔滔AI](http://www.talktalkai.com);滔滔AI,为爱滔滔!💕</center>")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
736
 
737
  with gr.Tab("🤗 - 轻松提取音乐"):
738
  with gr.Row():
 
733
  "</center>")
734
  gr.Markdown("### <center>🌊 - 身临其境般的AI音乐体验,AI歌手“想把我唱给你听”;Powered by [RVC-Project](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI)</center>")
735
  gr.Markdown("### <center>更多精彩应用,敬请关注[滔滔AI](http://www.talktalkai.com);滔滔AI,为爱滔滔!💕</center>")
736
+
737
+ with gr.Tab("🌊 - OpenAI TTS"):
738
+ with gr.Row(variant='panel'):
739
+ api_key = gr.Textbox(type='password', label='OpenAI API Key', placeholder='请在此填写您的OpenAI API Key')
740
+ model = gr.Dropdown(choices=['tts-1','tts-1-hd'], label='请选择模型(tts-1推理更快,tts-1-hd音质更好)', value='tts-1')
741
+ voice = gr.Dropdown(choices=['alloy', 'echo', 'fable', 'onyx', 'nova', 'shimmer'], label='请选择一个说话人', value='alloy')
742
+ with gr.Row():
743
+ with gr.Column():
744
+ inp_text = gr.Textbox(label="请填写您想生成的文本(中英文皆可)", placeholder="想说却还没说的 还很多 攒着是因为想写成歌", lines=5)
745
+ btn_text = gr.Button("一键开启真实拟声吧", variant="primary")
746
+
747
+ with gr.Column():
748
+ input_audio = gr.Audio(type="filepath", label="OpenAI TTS真实拟声", interactive=False)
749
+ btn_text.click(tts, [inp_text, model, voice, api_key], input_audio)
750
 
751
  with gr.Tab("🤗 - 轻松提取音乐"):
752
  with gr.Row():