aboutsummaryrefslogtreecommitdiff
path: root/app/backends/faster.py
diff options
context:
space:
mode:
authorhistoria <historiavg@proton.me>2026-08-24 04:53:43 -0400
committerhistoria <historiavg@proton.me>2026-08-24 04:53:43 -0400
commit0512a932bbf3b87619b6a250f87eb7904d22d1f7 (patch)
treedd2b0eb45823c0690ad2bc86f5aa9be2771f5b17 /app/backends/faster.py
parent9fb2434dcc8a1ed7bd085b453859d473de64448a (diff)
downloadtts-audiobook-generator-0512a932bbf3b87619b6a250f87eb7904d22d1f7.tar.gz
feat: hide convert/config/start-stop menus if no valid installation
Diffstat (limited to 'app/backends/faster.py')
-rwxr-xr-xapp/backends/faster.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/app/backends/faster.py b/app/backends/faster.py
index 0d34a0f..77b9c8a 100755
--- a/app/backends/faster.py
+++ b/app/backends/faster.py
@@ -31,6 +31,7 @@ from backends import (
common,
envs,
format_launch_hint,
+ servers,
)
from backends.common import (
APP_DIR,
@@ -356,18 +357,18 @@ def detect() -> BackendStatus:
details.append(f"voices: {voices_json}" if voices_json.exists() else
"no voices.json — run setup to create one")
launch = ""
- servers: List[ServerSpec] = []
+ specs: List[ServerSpec] = []
if cloned and voices_json.exists():
argv = [str(envs.env_python()),
str(_checkout() / "examples" / "openai_server.py"),
"--voices", str(voices_json), "--port", str(_config_port())]
- servers = [ServerSpec("faster", config.FASTER_API_URL, argv)]
- launch = format_launch_hint(servers)
+ specs = [ServerSpec("faster", config.FASTER_API_URL, argv)]
+ launch = format_launch_hint(specs)
return BackendStatus("faster", "faster-qwen3-tts",
installed=installed and cloned,
configured=configured, running=running,
details=details, launch_hint=launch,
- servers=servers)
+ servers=specs, managed=servers.manages(specs))
def _run_voices_only_tui() -> int: