mirror of
https://github.com/denizsafak/abogen.git
synced 2026-07-18 13:40:27 +02:00
refactor: move backend implementations to tts_backends package
Moved SupertonicPipeline from abogen/tts_supertonic.py to abogen/tts_backends/supertonic.py and load_numpy_kpipeline from abogen/utils.py to abogen/tts_backends/kokoro.py. Git correctly detects the Supertonic file as a rename (R), preserving full commit history. - New package: abogen/tts_backends/ - __init__.py (package marker) - supertonic.py (SupertonicPipeline, moved from tts_supertonic.py) - kokoro.py (load_numpy_kpipeline, moved from utils.py) - abogen/utils.py: re-exports load_numpy_kpipeline for backward compat - All imports updated to new canonical paths
This commit is contained in:
+2
-7
@@ -529,13 +529,6 @@ def prevent_sleep_end():
|
||||
_sleep_procs[system] = None
|
||||
|
||||
|
||||
def load_numpy_kpipeline():
|
||||
import numpy as np
|
||||
from kokoro import KPipeline # type: ignore[import-not-found]
|
||||
|
||||
return np, KPipeline
|
||||
|
||||
|
||||
class LoadPipelineThread(Thread):
|
||||
def __init__(self, callback):
|
||||
super().__init__()
|
||||
@@ -543,6 +536,8 @@ class LoadPipelineThread(Thread):
|
||||
|
||||
def run(self):
|
||||
try:
|
||||
from abogen.tts_backends.kokoro import load_numpy_kpipeline
|
||||
|
||||
np_module, kpipeline_class = load_numpy_kpipeline()
|
||||
self.callback(np_module, kpipeline_class, None)
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user