From 7e8bf663a65111fb648b01d9f45ad08eddbf2515 Mon Sep 17 00:00:00 2001 From: historia Date: Tue, 18 Aug 2026 19:32:48 -0400 Subject: feat: include narrator in output filenames --- converter/tts.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'converter/tts.py') diff --git a/converter/tts.py b/converter/tts.py index 49ebad0..b6049a1 100644 --- a/converter/tts.py +++ b/converter/tts.py @@ -15,6 +15,12 @@ from . import config logger = logging.getLogger(__name__) +def speaker_display_name() -> str: + """Return the Gradio display name for the configured custom speaker.""" + return config.SPEAKER_DISPLAY_NAMES.get( + config.CUSTOM_VOICE_SPEAKER.lower(), config.CUSTOM_VOICE_SPEAKER) + + def normalize_language(value: Optional[str]) -> str: """Normalize a user-provided language name to a Qwen3-TTS display name. @@ -291,8 +297,7 @@ class QwenTTSClient: payload = dict( text=text, lang_disp=self.language, - spk_disp=config.SPEAKER_DISPLAY_NAMES.get( - config.CUSTOM_VOICE_SPEAKER.lower(), config.CUSTOM_VOICE_SPEAKER), + spk_disp=speaker_display_name(), instruct=config.CUSTOM_VOICE_INSTRUCT, ) else: -- cgit v1.2.3