kemuririn commited on
Commit Β·
a1bcb2b
1
Parent(s): 019bf54
debug for hf space
Browse filesFiles changed (2)
123412 unmodified lines1718192021222327 unmodified lines51525354555657import spacesimport osimport reimport sys12 unmodified lines
class IndexTTS: @spaces.GPU def __init__(self, cfg_path='checkpoints/config.yaml', model_dir='checkpoints'): self.cfg = OmegaConf.load(cfg_path) self.device = 'cuda:0'27 unmodified lines def preprocess_text(self, text): return self.normalizer.infer(text)
@spaces.GPU def infer(self, audio_prompt, text, output_path): text = self.preprocess_text(text)
22 unmodified lines232425262627282922 unmodified linesos.makedirs("outputs/tasks",exist_ok=True)os.makedirs("prompts",exist_ok=True)
@spaces.GPU
def infer(voice, text,output_path=None): global tts if not tts:indextts/infer.py+3
webui.py+1-1