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