Spaces:
Paused
Paused
Update webui.py
Browse files5 unmodified lines67891011157 unmodified lines16917017117217317423 unmodified lines19819920020120220330 unmodified lines234235236237238239124 unmodified lines36436536636736836937060 unmodified lines4314324334344354364375 unmodified linesimport tracebackfrom pathlib import Pathfrom typing import Literal, Tupleimport numpy as npimport torch157 unmodified lines)self.phoneset_path = "soulxsinger/utils/phoneme/phone_set.json"def run_preprocess(self,prompt_path: Path,23 unmodified linesexcept Exception as e:return False, f"preprocess failed: {e}"def run_svs(self,control: str,30 unmodified linesexcept Exception as e:return False, f"svs inference failed: {e}", None, prompt_meta_path, target_meta_pathdef run_svs_from_paths(self,prompt_wav_path: str,124 unmodified linesx = x[0]return x if (x and os.path.isfile(x)) else Nonedef transcription_function(prompt_audio,target_audio,60 unmodified linesprint(traceback.format_exc(), file=sys.stderr, flush=True)return None, Nonedef synthesis_function(prompt_audio,prompt_metadata,5 unmodified lines6789101112157 unmodified lines17017117217317417517623 unmodified lines20020120220320420520630 unmodified lines237238239240241242243124 unmodified lines36836937037137237337460 unmodified lines4354364374384394404415 unmodified linesimport tracebackfrom pathlib import Pathfrom typing import Literal, Tupleimport spacesimport numpy as npimport torch157 unmodified lines)self.phoneset_path = "soulxsinger/utils/phoneme/phone_set.json"@spaces.GPUdef run_preprocess(self,prompt_path: Path,23 unmodified linesexcept Exception as e:return False, f"preprocess failed: {e}"@spaces.GPUdef run_svs(self,control: str,30 unmodified linesexcept Exception as e:return False, f"svs inference failed: {e}", None, prompt_meta_path, target_meta_path@spaces.GPUdef run_svs_from_paths(self,prompt_wav_path: str,124 unmodified linesx = x[0]return x if (x and os.path.isfile(x)) else None@spaces.GPUdef transcription_function(prompt_audio,target_audio,60 unmodified linesprint(traceback.format_exc(), file=sys.stderr, flush=True)return None, None@spaces.GPUdef synthesis_function(prompt_audio,prompt_metadata,
webui.py+6-2