Update app.py
Browse files
app.py
CHANGED
@@ -38,15 +38,7 @@ def load_set(set_file):
|
|
38 |
gr.update(value=set_json['noise']),gr.update(value=set_json['width']),
|
39 |
gr.update(value=set_json['pause']))
|
40 |
txt="""PiperTTS is a powerful text-to-speech TTS node designed to convert written text into high-quality spoken audio. This node leverages advanced voice synthesis models to generate natural-sounding speech, making it an invaluable tool for AI developers looking to add a vocal element to their projects."""
|
41 |
-
|
42 |
-
exp_file=f"./example/en_US-libritts-high__1_4__0_3__0_2__1.json"
|
43 |
-
return(gr.update(value=txt),gr.update(value=exp_file))
|
44 |
-
def exp2():
|
45 |
-
exp_file=f"./example/en_US-ryan-high__1__0_6__0_01__1.json"
|
46 |
-
return(gr.update(value=txt),gr.update(value=exp_file))
|
47 |
-
def exp3():
|
48 |
-
exp_file=f"./example/en_US-ljspeech-high__1__1__0_5__1.json"
|
49 |
-
return(gr.update(value=txt),gr.update(value=exp_file))
|
50 |
def button_on(stream):
|
51 |
if stream==True:
|
52 |
return gr.update(interactive=True,visible=True),gr.update(interactive=False,visible=False)
|
@@ -54,7 +46,7 @@ def button_on(stream):
|
|
54 |
return gr.update(interactive=False,visible=False),gr.update(interactive=True,visible=True)
|
55 |
def clear_aud():
|
56 |
return None
|
57 |
-
with gr.Blocks(
|
58 |
gr.HTML("""<h1 style='font-size:xxx-large;font-weight:900;'>Piper Fast TTS</h1>
|
59 |
<h4>Piper: <a href='https://github.com/rhasspy/piper' target='_blank'>https://github.com/rhasspy/piper</a></h4>
|
60 |
<h4>PyPiperTTS: <a href='https://github.com/broadfield-dev/PyPiperTTS' target='_blank'>https://github.com/broadfield-dev/PyPiperTTS</a></h4>
|
@@ -81,9 +73,7 @@ with gr.Blocks(theme="Hev832/Applio-Theme") as b:
|
|
81 |
with gr.Tab("Load Settings"):
|
82 |
load_file=gr.File()
|
83 |
with gr.Column(scale=1):
|
84 |
-
|
85 |
-
expbtn2=gr.Button("Example 2").click(exp2,None,[in_txt,load_file])
|
86 |
-
expbtn3=gr.Button("Example 3").click(exp3,None,[in_txt,load_file])
|
87 |
with gr.Accordion("Model Config"):
|
88 |
json_ob=gr.JSON(label="JSON")
|
89 |
f1=stream.change(button_on,stream,[stream_btn,sub_btn])
|
|
|
38 |
gr.update(value=set_json['noise']),gr.update(value=set_json['width']),
|
39 |
gr.update(value=set_json['pause']))
|
40 |
txt="""PiperTTS is a powerful text-to-speech TTS node designed to convert written text into high-quality spoken audio. This node leverages advanced voice synthesis models to generate natural-sounding speech, making it an invaluable tool for AI developers looking to add a vocal element to their projects."""
|
41 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
def button_on(stream):
|
43 |
if stream==True:
|
44 |
return gr.update(interactive=True,visible=True),gr.update(interactive=False,visible=False)
|
|
|
46 |
return gr.update(interactive=False,visible=False),gr.update(interactive=True,visible=True)
|
47 |
def clear_aud():
|
48 |
return None
|
49 |
+
with gr.Blocks() as b:
|
50 |
gr.HTML("""<h1 style='font-size:xxx-large;font-weight:900;'>Piper Fast TTS</h1>
|
51 |
<h4>Piper: <a href='https://github.com/rhasspy/piper' target='_blank'>https://github.com/rhasspy/piper</a></h4>
|
52 |
<h4>PyPiperTTS: <a href='https://github.com/broadfield-dev/PyPiperTTS' target='_blank'>https://github.com/broadfield-dev/PyPiperTTS</a></h4>
|
|
|
73 |
with gr.Tab("Load Settings"):
|
74 |
load_file=gr.File()
|
75 |
with gr.Column(scale=1):
|
76 |
+
|
|
|
|
|
77 |
with gr.Accordion("Model Config"):
|
78 |
json_ob=gr.JSON(label="JSON")
|
79 |
f1=stream.change(button_on,stream,[stream_btn,sub_btn])
|