From db38085d07ce75f8961eecdc1919e98748254c53 Mon Sep 17 00:00:00 2001 From: historia Date: Fri, 28 Aug 2026 14:57:48 -0400 Subject: refactor: overhaul config.py, remove cli default options --- app/backends/audiocpp/wizard.py | 35 ++++------------------------------- 1 file changed, 4 insertions(+), 31 deletions(-) (limited to 'app/backends/audiocpp/wizard.py') diff --git a/app/backends/audiocpp/wizard.py b/app/backends/audiocpp/wizard.py index d85076a..6d2d33a 100644 --- a/app/backends/audiocpp/wizard.py +++ b/app/backends/audiocpp/wizard.py @@ -20,7 +20,6 @@ from backends.common import ( resolve_wav_dir_arg, write_prompt_text, ) -from converter import config from ui import taskview, tui from . import build as _build from . import configsync as _configsync @@ -288,7 +287,6 @@ def _wizard(stdscr, args: argparse.Namespace, parser: argparse.ArgumentParser "build": build, "lazy_load": True, "sync_port": None, - "sync_model_ids": s["sync_model_ids"], "wav_dir": s["wav_dir"], "plan": s["plan"], "download": s["download"], @@ -385,7 +383,6 @@ def _wizard(stdscr, args: argparse.Namespace, parser: argparse.ArgumentParser s["download"] = bool(result.get("download")) and ( _models.download_applicable(s["audiocpp_dir"], s["model_entries"])) - s["sync_model_ids"] = result.get("sync_model_ids") s["delete_unused"] = bool(result.get("delete_unused")) \ and bool(s["unused_entries"]) return _finalize() @@ -395,9 +392,9 @@ def _wizard(stdscr, args: argparse.Namespace, parser: argparse.ArgumentParser The Generate-audiobooks-style form replaces the old one-question- per-screen chain (host, port, port sync, backend, build offer, - wav directory, transcription plan, model-id sync, delete unused, - download). Rows whose question does not apply are hidden rather - than skipped silently. Esc or Cancel pops back to the model tree. + wav directory, transcription plan, delete unused, download). Rows + whose question does not apply are hidden rather than skipped + silently. Esc or Cancel pops back to the model tree. """ try: _compute_entries() @@ -487,16 +484,6 @@ def _wizard(stdscr, args: argparse.Namespace, parser: argparse.ArgumentParser "kind": "bool", "value": True, }) - model_sync_relevant = len(s["entry_ids"]) == 1 and not ( - config.AUDIOCPP_MODEL_ID == s["entry_ids"][0] - and config.AUDIOCPP_CLONE_MODEL_ID == s["entry_ids"][0]) - if model_sync_relevant: - fields.append({ - "key": "sync_model_ids", - "label": f"Make '{s['entry_ids'][0]}' the default model?", - "kind": "bool", "value": True, - }) - new_paths = {entry["path"] for entry in s["model_entries"]} s["unused_entries"] = _models.unused_installed_entries( s["output_path"], new_paths) \ @@ -636,9 +623,6 @@ def _execute_lanes(settings: dict, print(f"[OK] Deleted {removed} unused model " f"{'entry' if removed == 1 else 'entries'} from disk.") - if len(settings["entry_ids"]) == 1: - _configsync._offer_config_model_id_sync(settings["entry_ids"][0], - settings["sync_model_ids"]) _voices.print_empty_transcript_warning(state["transcripts"]) return 0 @@ -927,13 +911,6 @@ def _collect_from_flags(args: argparse.Namespace, print("[INFO] Aborted; existing server.json kept") return None - # Config sync decisions (auto-apply unless explicitly declined). - sync_model_ids: Optional[bool] = None - if len(entry_ids) == 1 and not ( - config.AUDIOCPP_MODEL_ID == entry_ids[0] - and config.AUDIOCPP_CLONE_MODEL_ID == entry_ids[0]): - sync_model_ids = not args.no_sync_model_ids - # Wav dir + transcription plan (defaults to the project's voices/ dir). wav_dir = args.input_dir if args.input_dir is not None else VOICES_DIR plan: Optional[dict] = None @@ -961,7 +938,6 @@ def _collect_from_flags(args: argparse.Namespace, "build": build, "lazy_load": lazy_load, "sync_port": None, - "sync_model_ids": sync_model_ids, "wav_dir": wav_dir, "plan": plan, "download": args.download, @@ -972,7 +948,7 @@ def build_parser() -> argparse.ArgumentParser: """The audio.cpp setup CLI (also used to build a default namespace).""" parser = argparse.ArgumentParser( description="Set up the audio.cpp TTS backend: clone/build, pick " - "models, write server.json, and sync app/converter/config.py.") + "models, write server.json, and sync the configured port.") parser.add_argument("--wavs", type=resolve_wav_dir_arg, default=None, dest="input_dir", metavar="WAV_DIR", help="Directory with .wav reference files to publish as " @@ -1017,9 +993,6 @@ def build_parser() -> argparse.ArgumentParser: help="Run model_manager_v2.py install for each hosted " "model automatically (default: print the commands " "only)") - parser.add_argument("--no-sync-model-ids", action="store_true", - help="Do not rewrite AUDIOCPP_MODEL_ID/" - "AUDIOCPP_CLONE_MODEL_ID for a single-entry server") return parser -- cgit v1.2.3