get_path_from_root.py 608 B

12345678910111213141516171819
  1. import os
  2. def get_path_from_root(*paths: str):
  3. return os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", *paths))
  4. if __name__ == "__main__":
  5. TORTOISE_VOICE_DIR_ABS = get_path_from_root("voices-tortoise")
  6. TORTOISE_LOCAL_MODELS_DIR = get_path_from_root("data", "models", "tortoise")
  7. # __file__ = c:\Users\admin\Desktop\one-click-installers-tts-main\tts-generation-webui\tts_webui\rvc_tab\rvc_tab.py
  8. get_path_from_root("data", "models", "tortoise")
  9. print(
  10. get_path_from_root(
  11. "data",
  12. "models",
  13. "tortoise",
  14. )
  15. )