Fix: import error

pyopenjtalk_worker.initialize() has the side effect of starting another process and should not be executed automatically on import.
This commit is contained in:
tsukumi
2024-03-08 07:31:33 +00:00
parent 75467936d9
commit 5de4884075
5 changed files with 16 additions and 15 deletions

View File

@@ -273,7 +273,7 @@ def __cache_dict(g2p_dict: dict[str, list[list[str]]], file_path: Path) -> None:
def __get_dict() -> dict[str, list[list[str]]]:
if os.path.exists(CACHE_PATH):
if CACHE_PATH.exists():
with open(CACHE_PATH, "rb") as pickle_file:
g2p_dict = pickle.load(pickle_file)
else: