Spaces:
Sleeping
Sleeping
mrfakename
commited on
Commit
•
437bd90
1
Parent(s):
1674465
Update app.py
Browse files
app.py
CHANGED
@@ -12,8 +12,8 @@ for v in voicelist:
|
|
12 |
def synthesize(text, voice):
|
13 |
if text.strip() == "":
|
14 |
raise gr.Error("You must enter some text")
|
15 |
-
if len(text) >
|
16 |
-
raise gr.Error("Text must be under
|
17 |
v = voice.lower()
|
18 |
return (24000, styletts2importable.inference(text, voices[v], alpha=0.3, beta=0.7, diffusion_steps=7, embedding_scale=1))
|
19 |
def clsynthesize(text, voice):
|
@@ -25,8 +25,8 @@ def clsynthesize(text, voice):
|
|
25 |
def ljsynthesize(text):
|
26 |
if text.strip() == "":
|
27 |
raise gr.Error("You must enter some text")
|
28 |
-
if len(text) >
|
29 |
-
raise gr.Error("Text must be under
|
30 |
noise = torch.randn(1,1,256).to('cuda' if torch.cuda.is_available() else 'cpu')
|
31 |
return (24000, ljspeechimportable.inference(text, noise, diffusion_steps=7, embedding_scale=1))
|
32 |
|
|
|
12 |
def synthesize(text, voice):
|
13 |
if text.strip() == "":
|
14 |
raise gr.Error("You must enter some text")
|
15 |
+
if len(text) > 500:
|
16 |
+
raise gr.Error("Text must be under 500 characters")
|
17 |
v = voice.lower()
|
18 |
return (24000, styletts2importable.inference(text, voices[v], alpha=0.3, beta=0.7, diffusion_steps=7, embedding_scale=1))
|
19 |
def clsynthesize(text, voice):
|
|
|
25 |
def ljsynthesize(text):
|
26 |
if text.strip() == "":
|
27 |
raise gr.Error("You must enter some text")
|
28 |
+
if len(text) > 500:
|
29 |
+
raise gr.Error("Text must be under 500 characters")
|
30 |
noise = torch.randn(1,1,256).to('cuda' if torch.cuda.is_available() else 'cpu')
|
31 |
return (24000, ljspeechimportable.inference(text, noise, diffusion_steps=7, embedding_scale=1))
|
32 |
|