Spaces:
Runtime error
Runtime error
zero
Browse files
app.py
CHANGED
@@ -35,6 +35,7 @@ import ljspeechimportable
|
|
35 |
import torch
|
36 |
import os
|
37 |
from txtsplit import txtsplit
|
|
|
38 |
import numpy as np
|
39 |
import pickle
|
40 |
theme = gr.themes.Base(
|
@@ -64,6 +65,7 @@ for v in voicelist:
|
|
64 |
# # return (24000, styletts2importable.inference(text, voices[v], alpha=0.3, beta=0.7, diffusion_steps=7, embedding_scale=1))
|
65 |
# return (24000, styletts2importable.inference(text, voices[v], alpha=0.3, beta=0.7, diffusion_steps=multispeakersteps, embedding_scale=1))
|
66 |
if not torch.cuda.is_available(): INTROTXT += "\n\n### on CPU, it'll run rather slower, but not too much."
|
|
|
67 |
def synthesize(text, voice, lngsteps,embscale,alpha, beta, password, progress=gr.Progress()):
|
68 |
if text.strip() == "":
|
69 |
raise gr.Error("You must enter some text")
|
@@ -134,7 +136,7 @@ def clsynthesize(text, voice, vcsteps, embscale, alpha, beta, progress=gr.Progre
|
|
134 |
return (24000, np.concatenate(audios))
|
135 |
|
136 |
|
137 |
-
|
138 |
def ljsynthesize(text, steps,embscale, progress=gr.Progress()):
|
139 |
|
140 |
|
|
|
35 |
import torch
|
36 |
import os
|
37 |
from txtsplit import txtsplit
|
38 |
+
import spaces
|
39 |
import numpy as np
|
40 |
import pickle
|
41 |
theme = gr.themes.Base(
|
|
|
65 |
# # return (24000, styletts2importable.inference(text, voices[v], alpha=0.3, beta=0.7, diffusion_steps=7, embedding_scale=1))
|
66 |
# return (24000, styletts2importable.inference(text, voices[v], alpha=0.3, beta=0.7, diffusion_steps=multispeakersteps, embedding_scale=1))
|
67 |
if not torch.cuda.is_available(): INTROTXT += "\n\n### on CPU, it'll run rather slower, but not too much."
|
68 |
+
@spaces.GPU
|
69 |
def synthesize(text, voice, lngsteps,embscale,alpha, beta, password, progress=gr.Progress()):
|
70 |
if text.strip() == "":
|
71 |
raise gr.Error("You must enter some text")
|
|
|
136 |
return (24000, np.concatenate(audios))
|
137 |
|
138 |
|
139 |
+
@spaces.GPU
|
140 |
def ljsynthesize(text, steps,embscale, progress=gr.Progress()):
|
141 |
|
142 |
|