feat: Supertonic language + total_steps propagation

Language enum expanded from 9 to 33 languages:
- Added 24 new ISO 639-1 languages: AR, BG, CS, DA, DE, EL, ET, FI,
  HR, HU, ID, KO, LT, LV, NL, PL, RO, RU, SK, SL, SV, TR, UK, VI
- Updated display_name, is_cjk (added KO)

Supertonic language mapping (32 languages, no ZH):
- engine.py: _SUPERTONIC_LANG_MAP, engine_language(), supported_languages()
- __init__.py: create_engine() passes config.language to pipeline
- pipeline.py: __init__() accepts language, resolves to ISO code;
  __call__() passes lang= to TTS.synthesize()

total_steps propagation:
- tts_segments(): +total_steps param, conditionally passed to backend
- synthesize_text(): +total_steps param
- run_tts_segment_loop(): +total_steps param
- executor: all 5 synthesize_text() calls pass total_steps

Integration:
- pipeline_factory: create_pipeline_for_job() passes language to supertonic
- preview path: create_pipeline('supertonic', language=language)

Tests updated to accept total_steps in FakeBackend.__call__
This commit is contained in:
Artem Akymenko
2026-07-28 14:09:42 +03:00
parent 953bef1e71
commit 2b70b9ca45
14 changed files with 146 additions and 15 deletions
+9
View File
@@ -158,6 +158,7 @@ class SupertonicPipeline:
def __init__(
self,
*,
language: Any = None,
sample_rate: int,
auto_download: bool = True,
total_steps: int = 5,
@@ -167,6 +168,13 @@ class SupertonicPipeline:
self.total_steps = int(total_steps)
self.max_chunk_length = int(max_chunk_length)
# Resolve language to ISO 639-1 code for Supertonic
if language is not None:
from plugins.supertonic.engine import engine_language
self._lang = engine_language(language)
else:
self._lang = "en"
_configure_supertonic_gpu()
try:
@@ -212,6 +220,7 @@ class SupertonicPipeline:
max_chunk_length=self.max_chunk_length,
silence_duration=0.0,
verbose=False,
lang=self._lang,
)
break
except ValueError as exc: