Hannah commited on
Commit
a1dbf4b
·
1 Parent(s): 91b39d4
Files changed (3) hide show
  1. __pycache__/app.cpython-311.pyc +0 -0
  2. app.py +14 -0
  3. requirements.txt +1 -0
__pycache__/app.cpython-311.pyc ADDED
Binary file (1.56 kB). View file
 
app.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ with gr.Blocks(title="Audio Generation", theme=gr.themes.Monochrome()) as demo:
4
+ input = gr.Textbox(label="需要转换的文本", value="最近很辛苦,五一我要出去找个地方散散心!")
5
+ voice_style = gr.Dropdown(["男声1-台湾话", "男声2-香港话", "男声3-普通话", "男声4-普通话", "男声5-普通话", "男声6-普通话", "女声1-普通话", "女声2-普通话", "女声3-辽宁话", "女声4-山西话", "女声5-香港话", "女声6-香港话", "女声7-台湾话", "女声8-台湾话"], label="默认角色", value="女声7-台湾话")
6
+ output = gr.Audio(label="合成的语音")
7
+ submit_button = gr.Button("提交")
8
+ gr.Examples(
9
+ examples=[["cantina.wav", "abc"]],
10
+ inputs=[input, voice_style],
11
+ label="案例",
12
+ )
13
+
14
+ demo.launch()
requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ https://gradio-builds.s3.amazonaws.com/ed445c29f4e93b20db1d39d4b8165b3c6ee11107/gradio-4.31.5-py3-none-any.whl