aboutsummaryrefslogtreecommitdiff
path: root/app/backends/audiocpp/wizard.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/backends/audiocpp/wizard.py')
-rw-r--r--app/backends/audiocpp/wizard.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/app/backends/audiocpp/wizard.py b/app/backends/audiocpp/wizard.py
index 2034827..831ae3d 100644
--- a/app/backends/audiocpp/wizard.py
+++ b/app/backends/audiocpp/wizard.py
@@ -14,9 +14,7 @@ from backends import common
from backends.common import (
APP_DIR,
PROMPT_TEXT_FILENAME,
- TTS_ROOT,
VOICES_DIR,
- detect_wav_dir,
find_wav_files,
read_prompt_text,
resolve_wav_dir_arg,
@@ -336,7 +334,8 @@ def _wizard(stdscr, args: argparse.Namespace, parser: argparse.ArgumentParser
picked = tui.checkbox_tree(
stdscr, "Select TTS models to host",
tree_families, expand_all=args.all_packages,
- back_value=_GO_BACK, checked=checked_set)
+ back_value=_GO_BACK, checked=checked_set,
+ start_on_buttons=True)
if picked is _GO_BACK:
return tui.Wizard.BACK
chosen: Dict[str, List[dict]] = {}
@@ -452,14 +451,17 @@ def _wizard(stdscr, args: argparse.Namespace, parser: argparse.ArgumentParser
s["backend"] = None # decided by the form
s["build"] = None
- # Clone-voice directory seed: the project voices/ dir (detected),
- # or the voice_dir recorded by the server.json being modified.
+ # Clone-voice directory seed: the voice_dir recorded by the
+ # server.json being modified, else the project voices/ dir (the
+ # same default the --wavs flag documents). No auto-detection: the
+ # field must never start blank.
wav_start = None
if s["include_clone"]:
- wav_start = detect_wav_dir(s["audiocpp_dir"], TTS_ROOT)
if isinstance(s["existing_voice_dir"], str) \
and s["existing_voice_dir"]:
wav_start = Path(s["existing_voice_dir"])
+ else:
+ wav_start = VOICES_DIR
s["wav_dir"] = wav_start
fields: List[dict] = []
@@ -572,7 +574,7 @@ def _wizard(stdscr, args: argparse.Namespace, parser: argparse.ArgumentParser
result = tui.form(
stdscr, "Configure audio.cpp", fields,
- buttons=("Continue!", "Cancel"),
+ buttons=("Continue", "Cancel"),
start_on_buttons=False, back_value=tui.Wizard.BACK)
if result is tui.Wizard.BACK:
return tui.Wizard.BACK