From ec55918b0453807b1d70750fce1552a136371b37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20=C5=9Eafak?= Date: Thu, 23 Jul 2026 02:28:41 +0300 Subject: [PATCH] fix: add load_single_voice to Pipeline wrapper to prevent formula string being used as download filename --- abogen/tts_plugin/utils.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/abogen/tts_plugin/utils.py b/abogen/tts_plugin/utils.py index 0bbdb71..dd92431 100644 --- a/abogen/tts_plugin/utils.py +++ b/abogen/tts_plugin/utils.py @@ -179,6 +179,12 @@ class Pipeline: yield Segment(graphemes=text, audio=audio_array) + def load_single_voice(self, voice_name: str) -> Any: + engine_pipeline = getattr(self._engine, '_pipeline', None) + if engine_pipeline is not None and hasattr(engine_pipeline, 'load_single_voice'): + return engine_pipeline.load_single_voice(voice_name) + raise AttributeError(f"load_single_voice not available on {type(self._engine).__name__}") + def dispose(self) -> None: if self._session is not None: try: