From bcfb92e4493320989498b9d249ba68f778de7150 Mon Sep 17 00:00:00 2001 From: KoljaB Date: Sat, 11 Jan 2025 17:47:10 +0100 Subject: [PATCH] kokoro support --- RealtimeTTS/engines/kokoro_engine.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/RealtimeTTS/engines/kokoro_engine.py b/RealtimeTTS/engines/kokoro_engine.py index 4456cb1..c7a366a 100644 --- a/RealtimeTTS/engines/kokoro_engine.py +++ b/RealtimeTTS/engines/kokoro_engine.py @@ -40,14 +40,15 @@ def __init__( debug (bool): If True, prints debug info. """ super().__init__() # Ensure BaseEngine is properly initialized + self.debug = debug self.kokoro_root = kokoro_root.replace("\\", "/") # Add the root directory to sys.path root_directory = os.path.abspath(os.path.join(os.path.dirname(__file__), self.kokoro_root)) - print(f"Adding {root_directory} to sys.path") + if self.debug: + print(f"Adding {root_directory} to sys.path") sys.path.append(root_directory) - self.debug = debug self.queue = Queue() # Queue for feeding audio data to the output self.device = "cuda" if torch.cuda.is_available() else "cpu"