Spaces:
Runtime error
Runtime error
Commit
·
62bc974
1
Parent(s):
39e26fe
Update app.py
Browse files
app.py
CHANGED
@@ -24,7 +24,7 @@ def synthesize(text, voice, multispeakersteps):
|
|
24 |
if text.strip() == "":
|
25 |
raise gr.Error("You must enter some text")
|
26 |
# if len(global_phonemizer.phonemize([text])) > 300:
|
27 |
-
if len(text) >
|
28 |
raise gr.Error("Text must be under 300 characters")
|
29 |
v = voice.lower()
|
30 |
# return (24000, styletts2importable.inference(text, voices[v], alpha=0.3, beta=0.7, diffusion_steps=7, embedding_scale=1))
|
@@ -49,7 +49,7 @@ def clsynthesize(text, voice, vcsteps):
|
|
49 |
if text.strip() == "":
|
50 |
raise gr.Error("You must enter some text")
|
51 |
# if global_phonemizer.phonemize([text]) > 300:
|
52 |
-
if len(text) >
|
53 |
raise gr.Error("Text must be under 300 characters")
|
54 |
# return (24000, styletts2importable.inference(text, styletts2importable.compute_style(voice), alpha=0.3, beta=0.7, diffusion_steps=20, embedding_scale=1))
|
55 |
return (24000, styletts2importable.inference(text, styletts2importable.compute_style(voice), alpha=0.3, beta=0.7, diffusion_steps=vcsteps, embedding_scale=1))
|
@@ -57,7 +57,7 @@ def ljsynthesize(text):
|
|
57 |
if text.strip() == "":
|
58 |
raise gr.Error("You must enter some text")
|
59 |
# if global_phonemizer.phonemize([text]) > 300:
|
60 |
-
if len(text) >
|
61 |
raise gr.Error("Text must be under 300 characters")
|
62 |
noise = torch.randn(1,1,256).to('cuda' if torch.cuda.is_available() else 'cpu')
|
63 |
return (24000, ljspeechimportable.inference(text, noise, diffusion_steps=7, embedding_scale=1))
|
|
|
24 |
if text.strip() == "":
|
25 |
raise gr.Error("You must enter some text")
|
26 |
# if len(global_phonemizer.phonemize([text])) > 300:
|
27 |
+
if len(text) > 350:
|
28 |
raise gr.Error("Text must be under 300 characters")
|
29 |
v = voice.lower()
|
30 |
# return (24000, styletts2importable.inference(text, voices[v], alpha=0.3, beta=0.7, diffusion_steps=7, embedding_scale=1))
|
|
|
49 |
if text.strip() == "":
|
50 |
raise gr.Error("You must enter some text")
|
51 |
# if global_phonemizer.phonemize([text]) > 300:
|
52 |
+
if len(text) > 350:
|
53 |
raise gr.Error("Text must be under 300 characters")
|
54 |
# return (24000, styletts2importable.inference(text, styletts2importable.compute_style(voice), alpha=0.3, beta=0.7, diffusion_steps=20, embedding_scale=1))
|
55 |
return (24000, styletts2importable.inference(text, styletts2importable.compute_style(voice), alpha=0.3, beta=0.7, diffusion_steps=vcsteps, embedding_scale=1))
|
|
|
57 |
if text.strip() == "":
|
58 |
raise gr.Error("You must enter some text")
|
59 |
# if global_phonemizer.phonemize([text]) > 300:
|
60 |
+
if len(text) > 350:
|
61 |
raise gr.Error("Text must be under 300 characters")
|
62 |
noise = torch.randn(1,1,256).to('cuda' if torch.cuda.is_available() else 'cpu')
|
63 |
return (24000, ljspeechimportable.inference(text, noise, diffusion_steps=7, embedding_scale=1))
|