Update app.py
Browse files
app.py
CHANGED
@@ -44,22 +44,11 @@ def exp2(exp_file):
|
|
44 |
return(gr.update(value=txt),gr.update(value=exp_file))
|
45 |
|
46 |
with gr.Blocks(theme="Hev832/Applio-Theme") as b:
|
47 |
-
gr.HTML("""<h1>Piper Fast TTS</h1>
|
48 |
<h4>Piper: <a href='https://github.com/rhasspy/piper' target='_blank'>https://github.com/rhasspy/piper</a></h4>
|
49 |
<h4>PyPiperTTS: <a href='https://github.com/broadfield-dev/PyPiperTTS' target='_blank'>https://github.com/broadfield-dev/PyPiperTTS</a></h4>
|
50 |
""")
|
51 |
with gr.Row():
|
52 |
-
with gr.Column(scale=1):
|
53 |
-
expbtn1=gr.Button("Example 1")
|
54 |
-
expbtn2=gr.Button("Example 2")
|
55 |
-
with gr.Accordion("Model Config"):
|
56 |
-
json_ob=gr.JSON(label="JSON")
|
57 |
-
with gr.Column(scale=2):
|
58 |
-
in_txt=gr.Textbox(label="Text",lines=10)
|
59 |
-
names=gr.Dropdown()
|
60 |
-
sub_btn=gr.Button()
|
61 |
-
out_aud=gr.Audio(streaming=True, autoplay=True)
|
62 |
-
|
63 |
with gr.Column(scale=1):
|
64 |
with gr.Accordion("Control"):
|
65 |
length=gr.Slider(label="Length", minimum=0.01, maximum=10.0, value=1.2)
|
@@ -74,6 +63,17 @@ with gr.Blocks(theme="Hev832/Applio-Theme") as b:
|
|
74 |
load_file=gr.File()
|
75 |
load_file.change(load_set,load_file,[names,length,noise,width,sen_pause])
|
76 |
#load_btn=gr.Button("Load").click(load_set,load_file,[names,length,noise,width,sen_pause])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
expbtn1.click(exp1,None,[in_txt,load_file])
|
78 |
expbtn2.click(exp2,None,[in_txt,load_file])
|
79 |
names.change(load_mod,names,json_ob)
|
|
|
44 |
return(gr.update(value=txt),gr.update(value=exp_file))
|
45 |
|
46 |
with gr.Blocks(theme="Hev832/Applio-Theme") as b:
|
47 |
+
gr.HTML("""<h1 style='font-size:xxx-large'>Piper Fast TTS</h1>
|
48 |
<h4>Piper: <a href='https://github.com/rhasspy/piper' target='_blank'>https://github.com/rhasspy/piper</a></h4>
|
49 |
<h4>PyPiperTTS: <a href='https://github.com/broadfield-dev/PyPiperTTS' target='_blank'>https://github.com/broadfield-dev/PyPiperTTS</a></h4>
|
50 |
""")
|
51 |
with gr.Row():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
with gr.Column(scale=1):
|
53 |
with gr.Accordion("Control"):
|
54 |
length=gr.Slider(label="Length", minimum=0.01, maximum=10.0, value=1.2)
|
|
|
63 |
load_file=gr.File()
|
64 |
load_file.change(load_set,load_file,[names,length,noise,width,sen_pause])
|
65 |
#load_btn=gr.Button("Load").click(load_set,load_file,[names,length,noise,width,sen_pause])
|
66 |
+
with gr.Column(scale=2):
|
67 |
+
in_txt=gr.Textbox(label="Text",lines=10)
|
68 |
+
names=gr.Dropdown()
|
69 |
+
sub_btn=gr.Button()
|
70 |
+
out_aud=gr.Audio(streaming=True, autoplay=True)
|
71 |
+
with gr.Column(scale=1):
|
72 |
+
expbtn1=gr.Button("Example 1")
|
73 |
+
expbtn2=gr.Button("Example 2")
|
74 |
+
with gr.Accordion("Model Config"):
|
75 |
+
json_ob=gr.JSON(label="JSON")
|
76 |
+
|
77 |
expbtn1.click(exp1,None,[in_txt,load_file])
|
78 |
expbtn2.click(exp2,None,[in_txt,load_file])
|
79 |
names.change(load_mod,names,json_ob)
|