diff options
Diffstat (limited to 'backends/qwen.py')
| -rw-r--r-- | backends/qwen.py | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/backends/qwen.py b/backends/qwen.py index 48e1804..60f3bb6 100644 --- a/backends/qwen.py +++ b/backends/qwen.py @@ -22,8 +22,8 @@ from typing import List, Optional sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) -import tui -from backends import BackendStatus, ModifyAction +from ui import tui +from backends import BackendStatus, ConfigureAction from backends import common from converter import config @@ -209,6 +209,10 @@ def detect() -> BackendStatus: installed = _is_installed() custom_port = _config_port(config.QWEN_API_URL, DEFAULT_CUSTOM_PORT) clone_port = _config_port(config.CLONE_API_URL, DEFAULT_CLONE_PORT) + # Running when either server is up — CustomVoice (speaker mode) or Base + # (voice clone) each suffice for a conversion on their own. + running = (common.server_running(config.QWEN_API_URL) + or common.server_running(config.CLONE_API_URL)) details: List[str] = [] details.append("pip: installed" if installed else "not installed — run setup to pip install qwen-tts") @@ -218,13 +222,14 @@ def detect() -> BackendStatus: launch = (f"qwen-tts-demo {QWEN_CUSTOMVOICE_MODEL} --ip 127.0.0.1 " f"--port {custom_port} ; qwen-tts-demo {QWEN_BASE_MODEL} " f"--ip 127.0.0.1 --port {clone_port}") - return BackendStatus("qwen", "Qwen3-TTS (demo server)", + return BackendStatus("qwen", "qwen-tts", installed=installed, configured=installed, - details=details, launch_hint=launch) + running=running, details=details, + launch_hint=launch) -modify_actions: List[ModifyAction] = [ - ModifyAction("Reconfigure Qwen3-TTS (ports/speaker)", run_tui), +configure_actions: List[ConfigureAction] = [ + ConfigureAction("Reconfigure qwen-tts (ports/speaker)", run_tui), ] |
