diff options
| author | historia <historiavg@proton.me> | 2026-08-27 17:46:02 -0400 |
|---|---|---|
| committer | historia <historiavg@proton.me> | 2026-08-27 17:46:02 -0400 |
| commit | 2a9a78dd1caec0811ed2640b28375890ee96e4cc (patch) | |
| tree | 6aebbb503a98eb035015ff56e51d4ccc4f4a395e /app/backends | |
| parent | cef2352a5e81b272d067c2c02eb9588e54edfcfd (diff) | |
| download | tts-audiobook-generator-2a9a78dd1caec0811ed2640b28375890ee96e4cc.tar.gz | |
feat: help menu in tui
Diffstat (limited to 'app/backends')
| -rw-r--r-- | app/backends/__init__.py | 4 | ||||
| -rw-r--r-- | app/backends/audiocpp/build.py | 6 | ||||
| -rw-r--r-- | app/backends/audiocpp/wizard.py | 8 | ||||
| -rwxr-xr-x | app/backends/faster.py | 2 | ||||
| -rw-r--r-- | app/backends/qwen.py | 6 |
5 files changed, 13 insertions, 13 deletions
diff --git a/app/backends/__init__.py b/app/backends/__init__.py index 8c9f045..89d95e2 100644 --- a/app/backends/__init__.py +++ b/app/backends/__init__.py @@ -6,7 +6,7 @@ command it prints once configured. This package aggregates them into a single registry so ``audiobook.py``'s TUI hub and future tools can iterate backends without hardcoding their names: ``backends.detect_all()`` reports which are set up (and whether their server is currently running), and the registry -drives the hub's "Configure backends" menu. +drives the hub's "Configure Backends" menu. The registry is built lazily on the first call to ``get``/``detect_all``/ ``detect`` (not at package import time), because the backend modules pull @@ -163,7 +163,7 @@ class BackendInfo: UPDATE refreshes the installed backend to the latest upstream version (pip -U / git fetch+reset, rebuilding where a binary must match the sources); same calling convention as UNINSTALL. Without UPDATE a - backend is skipped by the hub's "Update backends" action. + backend is skipped by the hub's "Update Backends" action. CONFIGURE_SCREEN, when given, is what the hub's "Configure <label>" menu entry runs instead of SETUP_SCREEN once the backend exists — a diff --git a/app/backends/audiocpp/build.py b/app/backends/audiocpp/build.py index b850859..22c72a1 100644 --- a/app/backends/audiocpp/build.py +++ b/app/backends/audiocpp/build.py @@ -63,7 +63,7 @@ def update(*, emit=None, cancel=None) -> int: The rebuild target is the backend recorded in server.json, else the one detected from existing build directories; when neither names one (nothing was ever built) the update stops after the checkout refresh - — 'Build audio.cpp server' handles a first build. The rebuild itself + — 'Build audio.cpp Server' handles a first build. The rebuild itself runs when the sources changed (HEAD moved) or the on-disk binary is missing or older than HEAD's commit time — the latter heals an interrupted (cancelled or failed) earlier rebuild, which leaves the @@ -94,7 +94,7 @@ def update(*, emit=None, cancel=None) -> int: backend = _rebuild_backend(checkout) if backend is None: print("[INFO] audiocpp_server was never built for a known " - "backend; skipping the rebuild. 'Build audio.cpp server' " + "backend; skipping the rebuild. 'Build audio.cpp Server' " "builds one.") return 0 binary = built_server_binary(checkout, backend) @@ -115,7 +115,7 @@ def update(*, emit=None, cancel=None) -> int: print(f"[WARNING] rebuild exited with code {build_rc}; see the " "messages above (the build log under app/logs/ has the " "full output). The binary on disk is now older than the " - "checked-out sources; re-running 'Update backends' will " + "checked-out sources; re-running 'Update Backends' will " "retry the rebuild.") else: print("[OK] rebuild complete.") diff --git a/app/backends/audiocpp/wizard.py b/app/backends/audiocpp/wizard.py index bfc0eb7..75d84ee 100644 --- a/app/backends/audiocpp/wizard.py +++ b/app/backends/audiocpp/wizard.py @@ -163,11 +163,11 @@ def _wizard(stdscr, args: argparse.Namespace, parser: argparse.ArgumentParser ) -> Optional[dict]: """Run every TUI screen; return the collected settings, or None to abort. - The wizard has two screens: the model tree ("Select TTS models to - host") and one combined configuration form (backend choice when it is + The wizard has two screens: the model tree ("Select TTS Models to + Host") and one combined configuration form (backend choice when it is ambiguous, build offer when needed, clone-voice directory, transcription plan, model download/defaults/cleanup), laid out like - the Generate-audiobooks screen — every option appears on one screen, + the Generate Audiobooks screen — every option appears on one screen, and options that do not apply are hidden instead of asked separately. The bind host is always 127.0.0.1 and the port comes from AUDIOCPP_API_URL in app/converter/config.py (the Settings screen), @@ -313,7 +313,7 @@ def _wizard(stdscr, args: argparse.Namespace, parser: argparse.ArgumentParser if target in valid_dirs: checked_set.add((family_index, target)) picked = tui.checkbox_tree( - stdscr, "Select TTS models to host", + stdscr, "Select TTS Models to Host", tree_families, expand_all=args.all_packages, back_value=_GO_BACK, checked=checked_set, start_on_buttons=True) diff --git a/app/backends/faster.py b/app/backends/faster.py index e52a023..3f279f8 100755 --- a/app/backends/faster.py +++ b/app/backends/faster.py @@ -238,7 +238,7 @@ def _wizard(stdscr, args: argparse.Namespace) -> Optional[dict]: }) result = tui.form( - stdscr, "Set up faster-qwen3-tts", fields, + stdscr, "Set Up faster-qwen3-tts", fields, buttons=("Continue", "Cancel"), start_on_buttons=False, back_value=_GO_BACK) if result is _GO_BACK: diff --git a/app/backends/qwen.py b/app/backends/qwen.py index 4f3afd9..2cd164f 100644 --- a/app/backends/qwen.py +++ b/app/backends/qwen.py @@ -494,7 +494,7 @@ def models_screen(stdscr) -> int: pip package; without one a guidance flash replaces the download, since pre-fetched weights without a backend to serve them buy nothing. The status table and options re-render after every action, so Esc pops back - to Configure backends. Always returns 0. + to Configure Backends. Always returns 0. """ while True: present = installed_models() @@ -522,7 +522,7 @@ def models_screen(stdscr) -> int: back_value=tui.Wizard.BACK, help_lines=["Models are normally pulled when their server first", "starts; Install pre-downloads one right now."], - table_title="Model state", table_rows=rows) + table_title="Model State", table_rows=rows) if choice is tui.Wizard.BACK: return 0 action, name = choice @@ -530,7 +530,7 @@ def models_screen(stdscr) -> int: continue if action == "install" and not _is_installed(): tui.flash(stdscr, "Install the qwen-tts backend first " - "(Configure backends > Install Backend).", "warn") + "(Configure Backends > Install Backend).", "warn") continue title = (f"Download {MODEL_REPOS[name]}" if action == "install" else f"Delete {name} weights") |
