Spaces:
Sleeping
Sleeping
mrfakename
commited on
Commit
•
46e08d9
1
Parent(s):
de640ca
Fix bug
Browse files
app.py
CHANGED
@@ -56,7 +56,7 @@ def synthesize(text, voice, lngsteps, password, progress=gr.Progress()):
|
|
56 |
# return (24000, np.concatenate(audios))
|
57 |
# else:
|
58 |
# raise gr.Error('Wrong access code')
|
59 |
-
def clsynthesize(text, voice, vcsteps):
|
60 |
# if text.strip() == "":
|
61 |
# raise gr.Error("You must enter some text")
|
62 |
# # if global_phonemizer.phonemize([text]) > 300:
|
@@ -69,12 +69,11 @@ def clsynthesize(text, voice, vcsteps):
|
|
69 |
if len(text) > 7500:
|
70 |
raise gr.Error("Text must be <7.5k characters")
|
71 |
texts = split_and_recombine_text(text)
|
72 |
-
v = voice.lower()
|
73 |
audios = []
|
74 |
for t in progress.tqdm(texts):
|
75 |
audios.append(styletts2importable.inference(t, styletts2importable.compute_style(voice), alpha=0.3, beta=0.7, diffusion_steps=vcsteps, embedding_scale=1))
|
76 |
return (24000, np.concatenate(audios))
|
77 |
-
def ljsynthesize(text, steps):
|
78 |
# if text.strip() == "":
|
79 |
# raise gr.Error("You must enter some text")
|
80 |
# # if global_phonemizer.phonemize([text]) > 300:
|
|
|
56 |
# return (24000, np.concatenate(audios))
|
57 |
# else:
|
58 |
# raise gr.Error('Wrong access code')
|
59 |
+
def clsynthesize(text, voice, vcsteps, progress=gr.Progress()):
|
60 |
# if text.strip() == "":
|
61 |
# raise gr.Error("You must enter some text")
|
62 |
# # if global_phonemizer.phonemize([text]) > 300:
|
|
|
69 |
if len(text) > 7500:
|
70 |
raise gr.Error("Text must be <7.5k characters")
|
71 |
texts = split_and_recombine_text(text)
|
|
|
72 |
audios = []
|
73 |
for t in progress.tqdm(texts):
|
74 |
audios.append(styletts2importable.inference(t, styletts2importable.compute_style(voice), alpha=0.3, beta=0.7, diffusion_steps=vcsteps, embedding_scale=1))
|
75 |
return (24000, np.concatenate(audios))
|
76 |
+
def ljsynthesize(text, steps, progress=gr.Progress()):
|
77 |
# if text.strip() == "":
|
78 |
# raise gr.Error("You must enter some text")
|
79 |
# # if global_phonemizer.phonemize([text]) > 300:
|