refactor: eliminate remaining legacy dependencies from production code

Task 1: Replace hardcoded VoiceLister bypass in get_voices()
- Use PluginManager → Engine → VoiceLister instead of direct imports
- No more hardcoded imports of plugins.kokoro.engine / plugins.supertonic.engine

Task 2: Remove SuperTonic Plugin dependency on legacy backend
- Create self-contained plugins/supertonic/pipeline.py
- Plugin no longer imports from abogen.tts_backends

Production code now has zero imports from:
- abogen.tts_backend
- abogen.tts_backend_registry
- abogen.tts_backends
This commit is contained in:
Artem Akymenko
2026-07-12 16:20:06 +03:00
parent a76d338931
commit 9150a80459
3 changed files with 285 additions and 9 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ from .engine import SuperTonicEngine
def _load_supertonic_pipeline(sample_rate: int = 24000, auto_download: bool = True, total_steps: int = 5) -> Any:
"""Lazy-load SuperTonic dependencies and create pipeline."""
from abogen.tts_backends.supertonic import SupertonicPipeline
from plugins.supertonic.pipeline import SupertonicPipeline
return SupertonicPipeline(
sample_rate=sample_rate,