Spaces:
Running
on
Zero
Running
on
Zero
10 second ZeroGPU time
Browse files
app.py
CHANGED
@@ -46,7 +46,7 @@ for v in voicelist:
|
|
46 |
# return (24000, styletts2importable.inference(text, voices[v], alpha=0.3, beta=0.7, diffusion_steps=multispeakersteps, embedding_scale=1))
|
47 |
if not torch.cuda.is_available(): INTROTXT += "\n\n### You are on a CPU-only system, inference will be much slower.\n\nYou can use the [online demo](https://huggingface.co/spaces/styletts2/styletts2) for fast inference."
|
48 |
|
49 |
-
@spaces.GPU
|
50 |
def synthesize(text, voice, lngsteps, password, progress=gr.Progress()):
|
51 |
if text.strip() == "":
|
52 |
raise gr.Error("You must enter some text")
|
@@ -79,7 +79,7 @@ def synthesize(text, voice, lngsteps, password, progress=gr.Progress()):
|
|
79 |
# else:
|
80 |
# raise gr.Error('Wrong access code')
|
81 |
|
82 |
-
@spaces.GPU
|
83 |
def clsynthesize(text, voice, vcsteps, embscale, alpha, beta, progress=gr.Progress()):
|
84 |
# if text.strip() == "":
|
85 |
# raise gr.Error("You must enter some text")
|
@@ -107,7 +107,7 @@ def clsynthesize(text, voice, vcsteps, embscale, alpha, beta, progress=gr.Progre
|
|
107 |
# audios.append(styletts2importable.inference(t, vs, diffusion_steps=10, alpha=0.3, beta=0.7, embedding_scale=5))
|
108 |
return (24000, np.concatenate(audios))
|
109 |
|
110 |
-
@spaces.GPU
|
111 |
def ljsynthesize(text, steps, progress=gr.Progress()):
|
112 |
# if text.strip() == "":
|
113 |
# raise gr.Error("You must enter some text")
|
|
|
46 |
# return (24000, styletts2importable.inference(text, voices[v], alpha=0.3, beta=0.7, diffusion_steps=multispeakersteps, embedding_scale=1))
|
47 |
if not torch.cuda.is_available(): INTROTXT += "\n\n### You are on a CPU-only system, inference will be much slower.\n\nYou can use the [online demo](https://huggingface.co/spaces/styletts2/styletts2) for fast inference."
|
48 |
|
49 |
+
@spaces.GPU(duration=10)
|
50 |
def synthesize(text, voice, lngsteps, password, progress=gr.Progress()):
|
51 |
if text.strip() == "":
|
52 |
raise gr.Error("You must enter some text")
|
|
|
79 |
# else:
|
80 |
# raise gr.Error('Wrong access code')
|
81 |
|
82 |
+
@spaces.GPU(duration=10)
|
83 |
def clsynthesize(text, voice, vcsteps, embscale, alpha, beta, progress=gr.Progress()):
|
84 |
# if text.strip() == "":
|
85 |
# raise gr.Error("You must enter some text")
|
|
|
107 |
# audios.append(styletts2importable.inference(t, vs, diffusion_steps=10, alpha=0.3, beta=0.7, embedding_scale=5))
|
108 |
return (24000, np.concatenate(audios))
|
109 |
|
110 |
+
@spaces.GPU(duration=10)
|
111 |
def ljsynthesize(text, steps, progress=gr.Progress()):
|
112 |
# if text.strip() == "":
|
113 |
# raise gr.Error("You must enter some text")
|