diff options
| author | historia <historiavg@proton.me> | 2026-08-26 21:22:40 -0400 |
|---|---|---|
| committer | historia <historiavg@proton.me> | 2026-08-26 21:22:40 -0400 |
| commit | 477ac3e827e3bdc9f14583fc3aa8db1fa2d27c52 (patch) | |
| tree | 1e21fa5af1d7a95ffc62fb03eed153056c38ae9e /app/backends/probe.py | |
| parent | 65c6f737f1545ef225768af897acd20f163a4fb4 (diff) | |
| download | tts-audiobook-generator-477ac3e827e3bdc9f14583fc3aa8db1fa2d27c52.tar.gz | |
feat: design model support for qwen-tts backend. remove unnecessary port split for qwen models
Diffstat (limited to 'app/backends/probe.py')
| -rw-r--r-- | app/backends/probe.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/backends/probe.py b/app/backends/probe.py index e996725..64dc7ab 100644 --- a/app/backends/probe.py +++ b/app/backends/probe.py @@ -14,7 +14,8 @@ identity check over plain HTTP: the endpoint names the converter calls (``/run_instruct`` / ``/run_custom_voice`` / ``/generate_custom_voice`` for the CustomVoice demo; ``/run_voice_clone`` / ``/generate_voice_clone`` - for the Base demo). + for the Base demo; ``/run_voice_design`` for the VoiceDesign + demo). ``identify_server`` returns one of the IDENTITY_* constants, or None when the URL does not answer or answers as something unrecognized. It is stdlib-only @@ -33,6 +34,7 @@ IDENTITY_AUDIOCPP = "audiocpp" IDENTITY_FASTER = "faster" IDENTITY_QWEN_CUSTOM = "qwen-custom" IDENTITY_QWEN_CLONE = "qwen-clone" +IDENTITY_QWEN_DESIGN = "qwen-design" # Endpoint names the converter resolves for each qwen demo server (see # converter.clients QwenTTSClient). Mirror them here so identification matches @@ -40,6 +42,7 @@ IDENTITY_QWEN_CLONE = "qwen-clone" _QWEN_CUSTOM_ENDPOINTS = ( "/run_instruct", "/run_custom_voice", "/generate_custom_voice") _QWEN_CLONE_ENDPOINTS = ("/run_voice_clone", "/generate_voice_clone") +_QWEN_DESIGN_ENDPOINTS = ("/run_voice_design",) DEFAULT_TIMEOUT = 3.0 @@ -105,6 +108,8 @@ def _identify_gradio(base: str, timeout: float) -> Optional[str]: return IDENTITY_QWEN_CUSTOM if any(name in endpoints for name in _QWEN_CLONE_ENDPOINTS): return IDENTITY_QWEN_CLONE + if any(name in endpoints for name in _QWEN_DESIGN_ENDPOINTS): + return IDENTITY_QWEN_DESIGN return None |
