Skip to content

Commit

Permalink
kokoro support
Browse files Browse the repository at this point in the history
  • Loading branch information
KoljaB committed Jan 11, 2025
1 parent f8f7019 commit bcfb92e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions RealtimeTTS/engines/kokoro_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit bcfb92e

Please sign in to comment.