diff options
| author | historia <historiavg@proton.me> | 2026-09-01 03:38:50 -0400 |
|---|---|---|
| committer | historia <historiavg@proton.me> | 2026-09-01 03:38:50 -0400 |
| commit | d15adb490b634dd22a65a1c8d7f4ec9fa74816b4 (patch) | |
| tree | 8fc5da437ceffc22482968cdf7c2591c81a407cc /app/converter/clients | |
| parent | 058b19e7a65b40b1024a4fdeb2233062ff273cfd (diff) | |
| download | tts-audiobook-generator-d15adb490b634dd22a65a1c8d7f4ec9fa74816b4.tar.gz | |
fix: hide speech-to-speech only models from config wizard
Diffstat (limited to 'app/converter/clients')
| -rw-r--r-- | app/converter/clients/audiocpp.py | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/app/converter/clients/audiocpp.py b/app/converter/clients/audiocpp.py index 44a1c3d..224d24a 100644 --- a/app/converter/clients/audiocpp.py +++ b/app/converter/clients/audiocpp.py @@ -135,8 +135,10 @@ AUDIOCPP_HINTED_ERRORS = ( # An s2s-only family (e.g. PersonaPlex) hosted for generation: no # hosting of the entry makes it narrate text. ("supports only speech-to-speech", - "This model only runs speech-to-speech conversations — it has no " - "text-to-speech task and cannot generate audiobooks."), + "This model is speech-to-speech, not TTS: it has no text-to-speech " + "task and cannot generate audiobooks. Consider deleting the model " + "from the server configuration (re-run Configure Backends → " + "audio.cpp and unselect it)."), ) # Families whose audio.cpp implementation only synthesizes by cloning a @@ -702,12 +704,15 @@ class AudioCppTTSClient(BaseTTSClient): f"Pick a synthesis entry with --model (available: {available})." ) if audiocpp_family_narrates(self.family) is False: + available = ", ".join(model["id"] for model in models) or "none" raise RuntimeError( - f"The audio.cpp model '{self.model_id}' belongs to the " - f"'{self.family}' family, which only transforms audio " - "(speech-to-speech) and cannot synthesize narration from " - "text; pick a TTS model entry with --model (available: " - f"{', '.join(model['id'] for model in models) or 'none'})." + f"The audio.cpp model '{self.model_id}' (family " + f"'{self.family}') is speech-to-speech, not TTS: it only " + "transforms audio and cannot synthesize narration from " + "text, so it cannot generate audiobooks. Consider " + "deleting the model (re-run Configure Backends → " + "audio.cpp and unselect it), or pick a TTS model entry " + f"with --model (available: {available})." ) def _unload_server_models(self) -> None: |
