You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not only that, whenever a call is made to phonemizer.phonemize a new instance of libespeak-ng is copied to /tmp, and after a few thousand calls this completely fills up my disk, and this results in phonemizer being unusable on any respectable dataset for my usecase (TTS).
gerelef
added a commit
to gerelef/phonemizer
that referenced
this issue
Jan 24, 2025
Memory leak in phonemize.py
phonemizer = BACKENDS[backend]
Spawns a new instance each time it's ran, while the old one persists in memory
One solution is to cache it, so it's only instantiated once:
Global cache for phonemizer backends
_PHONEMIZER_CACHE = {}
Create a cache key from the configuration
The text was updated successfully, but these errors were encountered: