diff options
Diffstat (limited to 'backends/common.py')
| -rw-r--r-- | backends/common.py | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/backends/common.py b/backends/common.py index d707fdc..2529a8f 100644 --- a/backends/common.py +++ b/backends/common.py @@ -20,6 +20,11 @@ from typing import Dict, List, Optional, Set, Tuple # (./audio.cpp, ./faster-qwen3-tts) so a single tree holds everything. TTS_ROOT = Path(__file__).resolve().parent.parent +# The project's sample-voice directory: .wav files dropped here are offered +# as the default source when a setup/configure wizard asks for a wav +# directory (both the TUI browser start and the --wavs flag default). +VOICES_DIR = TTS_ROOT / "voices" + # converter/config.py — rewritten in place by update_config_value so the # converter picks up the host/port/voice a wizard configured. CONFIG_PATH = TTS_ROOT / "converter" / "config.py" @@ -249,8 +254,12 @@ def git_clone(url: str, target: Path) -> int: def pip_install(packages: List[str]) -> int: - """pip install PACKAGES (into the current environment). Returns exit code.""" - print(f"[INFO] pip install {' '.join(packages)}...") - import sys - return run_console_subprocess([sys.executable, "-m", "pip", "install", - *packages]) + """pip install PACKAGES into the managed venv (``envs/tts``). Returns exit code. + + Delegates to ``backends.envs.pip_install`` so backend TTS packages are + installed alongside the app requirements in the tool-managed environment + rather than into whatever interpreter happens to be running the wizard. + The import is local to avoid a circular import (envs imports this module). + """ + from backends import envs + return envs.pip_install(packages) |
