aboutsummaryrefslogtreecommitdiff
path: root/app/tests/test_backends_audiocpp.py
diff options
context:
space:
mode:
authorhistoria <historiavg@proton.me>2026-09-01 03:38:50 -0400
committerhistoria <historiavg@proton.me>2026-09-01 03:38:50 -0400
commitd15adb490b634dd22a65a1c8d7f4ec9fa74816b4 (patch)
tree8fc5da437ceffc22482968cdf7c2591c81a407cc /app/tests/test_backends_audiocpp.py
parent058b19e7a65b40b1024a4fdeb2233062ff273cfd (diff)
downloadtts-audiobook-generator-d15adb490b634dd22a65a1c8d7f4ec9fa74816b4.tar.gz
fix: hide speech-to-speech only models from config wizard
Diffstat (limited to 'app/tests/test_backends_audiocpp.py')
-rw-r--r--app/tests/test_backends_audiocpp.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/app/tests/test_backends_audiocpp.py b/app/tests/test_backends_audiocpp.py
index 8b1698b..7edb3c9 100644
--- a/app/tests/test_backends_audiocpp.py
+++ b/app/tests/test_backends_audiocpp.py
@@ -385,6 +385,31 @@ class LoadModelCatalogTests(unittest.TestCase):
self.assertNotIn("empty_tts",
[entry["family"] for entry in catalog])
+ def test_skips_speech_to_speech_only_families(self):
+ # PersonaPlex-style specs: categorized "tts" but with a task list
+ # naming no text-synthesis capability — the family cannot narrate
+ # text and every request would fail, so it is never offered for
+ # install (the generic task check, no family names hardcoded).
+ _write_spec(self.checkout, "personaplex", tasks=("s2s",))
+ catalog = make_server.catalog.load_model_catalog(self.checkout)
+ self.assertNotIn("personaplex",
+ [entry["family"] for entry in catalog])
+
+ def test_design_only_family_is_kept(self):
+ # Voice design is a text-synthesis task: a vdes-only spec stays
+ # installable.
+ _write_spec(self.checkout, "designer", tasks=("vdes",))
+ catalog = make_server.catalog.load_model_catalog(self.checkout)
+ self.assertIn("designer", [entry["family"] for entry in catalog])
+
+ def test_taskless_tts_category_fallback_is_kept(self):
+ # A spec without a task list keeps the old category fallback, so
+ # a future/malformed "tts" spec is not silently dropped.
+ _write_spec(self.checkout, "mystery_tts", tasks=())
+ catalog = make_server.catalog.load_model_catalog(self.checkout)
+ self.assertIn("mystery_tts",
+ [entry["family"] for entry in catalog])
+
def test_families_sorted_alphabetically_by_display_name(self):
catalog = make_server.catalog.load_model_catalog(self.checkout)
names = [entry["display_name"].lower() for entry in catalog]