piper-sample-generator/script/run

18 lines
417 B
Text
Raw Permalink Normal View History

2023-10-06 12:10:43 -05:00
#!/usr/bin/env python3
import sys
import subprocess
import venv
from pathlib import Path
_DIR = Path(__file__).parent
_PROGRAM_DIR = _DIR.parent
_VENV_DIR = _PROGRAM_DIR / ".venv"
2025-08-29 12:19:25 -05:00
if _VENV_DIR.exists():
context = venv.EnvBuilder().ensure_directories(_VENV_DIR)
python_exe = context.env_exe
else:
python_exe = "python3"
2026-03-12 15:16:51 -05:00
subprocess.check_call([python_exe, "-m", "piper_sample_generator"] + sys.argv[1:])