mrfakename commited on
Commit
04c285e
1 Parent(s): 3ecf742

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -92,7 +92,7 @@ def ljsynthesize(text, steps, progress=gr.Progress()):
92
  return (24000, np.concatenate(audios))
93
 
94
 
95
- with gr.Blocks() as vctk: # just realized it isn't vctk but libritts but i'm too lazy to change it rn
96
  with gr.Row():
97
  with gr.Column(scale=1):
98
  inp = gr.Textbox(label="Text", info="What would you like StyleTTS 2 to read? It works better on full sentences.", interactive=True)
@@ -101,17 +101,17 @@ with gr.Blocks() as vctk: # just realized it isn't vctk but libritts but i'm too
101
  # use_gruut = gr.Checkbox(label="Use alternate phonemizer (Gruut) - Experimental")
102
  with gr.Column(scale=1):
103
  btn = gr.Button("Synthesize", variant="primary")
104
- audio = gr.Audio(interactive=False, label="Synthesized Audio")
105
  btn.click(synthesize, inputs=[inp, voice, multispeakersteps], outputs=[audio], concurrency_limit=4)
106
  with gr.Blocks() as clone:
107
  with gr.Row():
108
  with gr.Column(scale=1):
109
  clinp = gr.Textbox(label="Text", info="What would you like StyleTTS 2 to read? It works better on full sentences.", interactive=True)
110
- clvoice = gr.Audio(label="Voice", interactive=True, type='filepath', max_length=300)
111
  vcsteps = gr.Slider(minimum=3, maximum=20, value=20, step=1, label="Diffusion Steps", info="Theoretically, higher should be better quality but slower, but we cannot notice a difference. Try with lower steps first - it is faster", interactive=True)
112
  with gr.Column(scale=1):
113
  clbtn = gr.Button("Synthesize", variant="primary")
114
- claudio = gr.Audio(interactive=False, label="Synthesized Audio")
115
  clbtn.click(clsynthesize, inputs=[clinp, clvoice, vcsteps], outputs=[claudio], concurrency_limit=4)
116
  # with gr.Blocks() as longText:
117
  # with gr.Row():
@@ -131,7 +131,7 @@ with gr.Blocks() as lj:
131
  ljsteps = gr.Slider(minimum=3, maximum=20, value=3, step=1, label="Diffusion Steps", info="Theoretically, higher should be better quality but slower, but we cannot notice a difference. Try with lower steps first - it is faster", interactive=True)
132
  with gr.Column(scale=1):
133
  ljbtn = gr.Button("Synthesize", variant="primary")
134
- ljaudio = gr.Audio(interactive=False, label="Synthesized Audio")
135
  ljbtn.click(ljsynthesize, inputs=[ljinp, ljsteps], outputs=[ljaudio], concurrency_limit=4)
136
  with gr.Blocks(title="StyleTTS 2", css="footer{display:none !important}", theme=theme) as demo:
137
  gr.Markdown("""# StyleTTS 2
 
92
  return (24000, np.concatenate(audios))
93
 
94
 
95
+ with gr.Blocks() as vctk:
96
  with gr.Row():
97
  with gr.Column(scale=1):
98
  inp = gr.Textbox(label="Text", info="What would you like StyleTTS 2 to read? It works better on full sentences.", interactive=True)
 
101
  # use_gruut = gr.Checkbox(label="Use alternate phonemizer (Gruut) - Experimental")
102
  with gr.Column(scale=1):
103
  btn = gr.Button("Synthesize", variant="primary")
104
+ audio = gr.Audio(interactive=False, label="Synthesized Audio", waveform_options={'waveform_progress_color': '#3C82F6'})
105
  btn.click(synthesize, inputs=[inp, voice, multispeakersteps], outputs=[audio], concurrency_limit=4)
106
  with gr.Blocks() as clone:
107
  with gr.Row():
108
  with gr.Column(scale=1):
109
  clinp = gr.Textbox(label="Text", info="What would you like StyleTTS 2 to read? It works better on full sentences.", interactive=True)
110
+ clvoice = gr.Audio(label="Voice", interactive=True, type='filepath', max_length=300, waveform_options={'waveform_progress_color': '#3C82F6'})
111
  vcsteps = gr.Slider(minimum=3, maximum=20, value=20, step=1, label="Diffusion Steps", info="Theoretically, higher should be better quality but slower, but we cannot notice a difference. Try with lower steps first - it is faster", interactive=True)
112
  with gr.Column(scale=1):
113
  clbtn = gr.Button("Synthesize", variant="primary")
114
+ claudio = gr.Audio(interactive=False, label="Synthesized Audio", waveform_options={'waveform_progress_color': '#3C82F6'})
115
  clbtn.click(clsynthesize, inputs=[clinp, clvoice, vcsteps], outputs=[claudio], concurrency_limit=4)
116
  # with gr.Blocks() as longText:
117
  # with gr.Row():
 
131
  ljsteps = gr.Slider(minimum=3, maximum=20, value=3, step=1, label="Diffusion Steps", info="Theoretically, higher should be better quality but slower, but we cannot notice a difference. Try with lower steps first - it is faster", interactive=True)
132
  with gr.Column(scale=1):
133
  ljbtn = gr.Button("Synthesize", variant="primary")
134
+ ljaudio = gr.Audio(interactive=False, label="Synthesized Audio", waveform_options={'waveform_progress_color': '#3C82F6'})
135
  ljbtn.click(ljsynthesize, inputs=[ljinp, ljsteps], outputs=[ljaudio], concurrency_limit=4)
136
  with gr.Blocks(title="StyleTTS 2", css="footer{display:none !important}", theme=theme) as demo:
137
  gr.Markdown("""# StyleTTS 2