mirror of
https://github.com/denizsafak/abogen.git
synced 2026-09-20 11:40:57 +02:00
refactor: unify Language enum across all layers
- EngineConfig.language: Language (was lang_code: str = 'a') - Engine owns _KOKORO_LANG_MAP, engine_language(), supported_languages() - Engine provides language_for_voice_id() for voice catalog - Plugins/kokoro/__init__.py calls engine_language() internally - create_pipeline(plugin_id, language=Language) — no kokoro codes - pipeline_factory.py clean of kokoro-specific code - Domain functions raise TypeError if non-enum passed - WebUI api.py: _parse_language() helper at API boundary - Voice catalog returns ISO codes (lang.value) - Constants: LANGUAGE_DESCRIPTIONS keyed by Language enum - All tests updated for Language enum - 1414 tests pass
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
from abogen.domain.enums import Language
|
||||
from abogen.webui.routes.utils import synthesize
|
||||
|
||||
|
||||
@@ -45,7 +46,7 @@ def test_preview_applies_manual_override_before_normalization(monkeypatch):
|
||||
synthesize.generate_preview_audio(
|
||||
text="He said Unfu*k loudly.",
|
||||
voice_spec="M1",
|
||||
language="en",
|
||||
language=Language.EN_US,
|
||||
speed=1.0,
|
||||
use_gpu=False,
|
||||
tts_provider="supertonic",
|
||||
|
||||
Reference in New Issue
Block a user