Commit
·
138b27f
1
Parent(s):
fa0a19e
Update app.py
Browse files
app.py
CHANGED
|
@@ -46,8 +46,8 @@ for v in voicelist:
|
|
| 46 |
def synthesize(text, voice, lngsteps, password, progress=gr.Progress()):
|
| 47 |
if text.strip() == "":
|
| 48 |
raise gr.Error("You must enter some text")
|
| 49 |
-
if len(text) >
|
| 50 |
-
raise gr.Error("Text must be <
|
| 51 |
texts = split_and_recombine_text(text)
|
| 52 |
v = voice.lower()
|
| 53 |
audios = []
|
|
@@ -80,8 +80,8 @@ def clsynthesize(text, voice, vcsteps, progress=gr.Progress()):
|
|
| 80 |
# return (24000, styletts2importable.inference(text, styletts2importable.compute_style(voice), alpha=0.3, beta=0.7, diffusion_steps=vcsteps, embedding_scale=1))
|
| 81 |
if text.strip() == "":
|
| 82 |
raise gr.Error("You must enter some text")
|
| 83 |
-
if len(text) >
|
| 84 |
-
raise gr.Error("Text must be <
|
| 85 |
texts = split_and_recombine_text(text)
|
| 86 |
audios = []
|
| 87 |
for t in progress.tqdm(texts):
|
|
@@ -97,8 +97,8 @@ def ljsynthesize(text, steps, progress=gr.Progress()):
|
|
| 97 |
# return (24000, ljspeechimportable.inference(text, noise, diffusion_steps=7, embedding_scale=1))
|
| 98 |
if text.strip() == "":
|
| 99 |
raise gr.Error("You must enter some text")
|
| 100 |
-
if len(text) >
|
| 101 |
-
raise gr.Error("Text must be <
|
| 102 |
texts = split_and_recombine_text(text)
|
| 103 |
audios = []
|
| 104 |
for t in progress.tqdm(texts):
|
|
|
|
| 46 |
def synthesize(text, voice, lngsteps, password, progress=gr.Progress()):
|
| 47 |
if text.strip() == "":
|
| 48 |
raise gr.Error("You must enter some text")
|
| 49 |
+
if len(text) > 50000:
|
| 50 |
+
raise gr.Error("Text must be <50k characters")
|
| 51 |
texts = split_and_recombine_text(text)
|
| 52 |
v = voice.lower()
|
| 53 |
audios = []
|
|
|
|
| 80 |
# return (24000, styletts2importable.inference(text, styletts2importable.compute_style(voice), alpha=0.3, beta=0.7, diffusion_steps=vcsteps, embedding_scale=1))
|
| 81 |
if text.strip() == "":
|
| 82 |
raise gr.Error("You must enter some text")
|
| 83 |
+
if len(text) > 50000:
|
| 84 |
+
raise gr.Error("Text must be <50k characters")
|
| 85 |
texts = split_and_recombine_text(text)
|
| 86 |
audios = []
|
| 87 |
for t in progress.tqdm(texts):
|
|
|
|
| 97 |
# return (24000, ljspeechimportable.inference(text, noise, diffusion_steps=7, embedding_scale=1))
|
| 98 |
if text.strip() == "":
|
| 99 |
raise gr.Error("You must enter some text")
|
| 100 |
+
if len(text) > 150000:
|
| 101 |
+
raise gr.Error("Text must be <150k characters")
|
| 102 |
texts = split_and_recombine_text(text)
|
| 103 |
audios = []
|
| 104 |
for t in progress.tqdm(texts):
|