Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -96,7 +96,7 @@ def clsynthesize(text, voice, vcsteps, embscale, alpha, beta, progress=gr.Progre
|
|
96 |
audios.append(styletts2importable.inference(t, vs, alpha=alpha, beta=beta, diffusion_steps=vcsteps, embedding_scale=embscale))
|
97 |
# audios.append(styletts2importable.inference(t, vs, diffusion_steps=10, alpha=0.3, beta=0.7, embedding_scale=5))
|
98 |
return (24000, np.concatenate(audios))
|
99 |
-
def ljsynthesize(text, steps, progress=gr.Progress()):
|
100 |
# if text.strip() == "":
|
101 |
# raise gr.Error("You must enter some text")
|
102 |
# # if global_phonemizer.phonemize([text]) > 300:
|
@@ -114,7 +114,7 @@ def ljsynthesize(text, steps, progress=gr.Progress()):
|
|
114 |
texts = txtsplit(text)
|
115 |
audios = []
|
116 |
for t in progress.tqdm(texts):
|
117 |
-
audios.append(ljspeechimportable.inference(t, noise, diffusion_steps=steps, embedding_scale=
|
118 |
return (24000, np.concatenate(audios))
|
119 |
|
120 |
|
@@ -157,6 +157,7 @@ with gr.Blocks() as lj:
|
|
157 |
with gr.Row():
|
158 |
with gr.Column(scale=1):
|
159 |
ljinp = gr.Textbox(label="Text", info="What would you like StyleTTS 2 to read? It works better on full sentences.", interactive=True)
|
|
|
160 |
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)
|
161 |
with gr.Column(scale=1):
|
162 |
ljbtn = gr.Button("Synthesize", variant="primary")
|
|
|
96 |
audios.append(styletts2importable.inference(t, vs, alpha=alpha, beta=beta, diffusion_steps=vcsteps, embedding_scale=embscale))
|
97 |
# audios.append(styletts2importable.inference(t, vs, diffusion_steps=10, alpha=0.3, beta=0.7, embedding_scale=5))
|
98 |
return (24000, np.concatenate(audios))
|
99 |
+
def ljsynthesize(text, steps,embscale, progress=gr.Progress()):
|
100 |
# if text.strip() == "":
|
101 |
# raise gr.Error("You must enter some text")
|
102 |
# # if global_phonemizer.phonemize([text]) > 300:
|
|
|
114 |
texts = txtsplit(text)
|
115 |
audios = []
|
116 |
for t in progress.tqdm(texts):
|
117 |
+
audios.append(ljspeechimportable.inference(t, noise, diffusion_steps=steps, embedding_scale=embscale))
|
118 |
return (24000, np.concatenate(audios))
|
119 |
|
120 |
|
|
|
157 |
with gr.Row():
|
158 |
with gr.Column(scale=1):
|
159 |
ljinp = gr.Textbox(label="Text", info="What would you like StyleTTS 2 to read? It works better on full sentences.", interactive=True)
|
160 |
+
embscale = gr.Slider(minimum=1, maximum=10, value=1, step=0.1, label="Embedding Scale (READ WARNING BELOW)", info="Defaults to 1. これを上げたらパフォーマンスがもっとエモーショナルになる、増やしすぎるとだめになるので、ご注意ください", interactive=True)
|
161 |
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)
|
162 |
with gr.Column(scale=1):
|
163 |
ljbtn = gr.Button("Synthesize", variant="primary")
|