mbarnig commited on
Commit
5f49f83
·
verified ·
1 Parent(s): 1b0aa13

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -16
app.py CHANGED
@@ -89,16 +89,9 @@ def load_set(set_file):
89
  return(gr.update(value=set_json['model']),gr.update(value=set_json['length']),
90
  gr.update(value=set_json['noise']),gr.update(value=set_json['width']),
91
  gr.update(value=set_json['pause']))
 
92
  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."""
93
- # def exp1():
94
- # exp_file=f"./example/en_US-libritts-high__1_4__0_3__0_2__1.json"
95
- # return(gr.update(value=txt),gr.update(value=exp_file))
96
- # def exp2():
97
- # exp_file=f"./example/en_US-ryan-high__1__0_6__0_01__1.json"
98
- # return(gr.update(value=txt),gr.update(value=exp_file))
99
- # def exp3():
100
- # exp_file=f"./example/en_US-ljspeech-high__1__1__0_5__1.json"
101
- # return(gr.update(value=txt),gr.update(value=exp_file))
102
  def button_on(stream):
103
  if stream==True:
104
  return gr.update(interactive=True,visible=True),gr.update(interactive=False,visible=False)
@@ -110,7 +103,7 @@ with gr.Blocks() as b:
110
  gr.HTML("<h1>Rhasspy Piper LU TTS Streaming vum Synesthesiam</h1>")
111
  with gr.Row():
112
  with gr.Column(scale=2):
113
- in_txt=gr.Textbox(label="Text",lines=10)
114
  names=gr.Dropdown()
115
  with gr.Row():
116
  stream_btn=gr.Button("Stream",interactive=True,visible=True)
@@ -130,14 +123,8 @@ with gr.Blocks() as b:
130
  save_file=gr.File()
131
  with gr.Tab("Load Settings"):
132
  load_file=gr.File()
133
- # with gr.Column(scale=1):
134
- # expbtn1=gr.Button("Example 1").click(exp1,None,[in_txt,load_file])
135
- # expbtn2=gr.Button("Example 2").click(exp2,None,[in_txt,load_file])
136
- # expbtn3=gr.Button("Example 3").click(exp3,None,[in_txt,load_file])
137
  with gr.Accordion("Model Config", open=False):
138
  json_ob=gr.JSON(label="JSON")
139
- # with gr.Row():
140
- # gr.Textbox(label="Beispill", value=my_examples)
141
  f1=stream.change(button_on,stream,[stream_btn,sub_btn])
142
  f2=save_btn.click(save_set,[names,length,noise,width,sen_pause],save_file)
143
  f3=load_file.change(load_set,load_file,[names,length,noise,width,sen_pause])
 
89
  return(gr.update(value=set_json['model']),gr.update(value=set_json['length']),
90
  gr.update(value=set_json['noise']),gr.update(value=set_json['width']),
91
  gr.update(value=set_json['pause']))
92
+
93
  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."""
94
+
 
 
 
 
 
 
 
 
95
  def button_on(stream):
96
  if stream==True:
97
  return gr.update(interactive=True,visible=True),gr.update(interactive=False,visible=False)
 
103
  gr.HTML("<h1>Rhasspy Piper LU TTS Streaming vum Synesthesiam</h1>")
104
  with gr.Row():
105
  with gr.Column(scale=2):
106
+ in_txt=gr.Textbox(label="Text",lines=10, value=my_examples)
107
  names=gr.Dropdown()
108
  with gr.Row():
109
  stream_btn=gr.Button("Stream",interactive=True,visible=True)
 
123
  save_file=gr.File()
124
  with gr.Tab("Load Settings"):
125
  load_file=gr.File()
 
 
 
 
126
  with gr.Accordion("Model Config", open=False):
127
  json_ob=gr.JSON(label="JSON")
 
 
128
  f1=stream.change(button_on,stream,[stream_btn,sub_btn])
129
  f2=save_btn.click(save_set,[names,length,noise,width,sen_pause],save_file)
130
  f3=load_file.change(load_set,load_file,[names,length,noise,width,sen_pause])