From 6274a02d5e38d9cbeaf59bdf71809791b92c99cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20=C5=9Eafak?= Date: Thu, 23 Jul 2026 03:55:07 +0300 Subject: [PATCH] Fix empty voice list when launched via desktop shortcut PluginManager.discover() used a relative path 'plugins', which resolved against the CWD. When launched from a desktop shortcut the CWD is ~, so the plugins directory was never found and no voices appeared in the list. Fall back to the project-relative plugins path when the default relative path doesn't resolve. --- abogen/tts_plugin/plugin_manager.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/abogen/tts_plugin/plugin_manager.py b/abogen/tts_plugin/plugin_manager.py index 1589d08..6789620 100644 --- a/abogen/tts_plugin/plugin_manager.py +++ b/abogen/tts_plugin/plugin_manager.py @@ -42,8 +42,11 @@ class PluginManager: plugins_path = Path(plugins_dir) if not plugins_path.exists(): - self._loaded = True - return + if plugins_dir == "plugins": + plugins_path = Path(__file__).resolve().parent.parent.parent / "plugins" + if not plugins_path.exists(): + self._loaded = True + return for entry in plugins_path.iterdir(): if entry.is_dir() and (entry / "__init__.py").exists():