Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add option to use custom espeak data path #191

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thewh1teagle
Copy link

@thewh1teagle thewh1teagle commented Jan 5, 2025

Add option to use custom espeak data path
To use with https://github.com/thewh1teagle/espeakng-loader

from phonemizer.backend.espeak.wrapper import EspeakWrapper
from phonemizer import phonemize
import espeakng_loader

EspeakWrapper.set_library(espeakng_loader.get_library_path())
EspeakWrapper.set_data_path(espeakng_loader.get_data_path()) # or './espeak-ng-data' 

phonemes = phonemize('Hello')
print('Phonemes: ', phonemes)

By the way, I have to say that using attributes and static variables with the same names, like _ESPEAK_DATA_PATH, self._data_path, and data_path, is extremely confusing. I really don’t understand why this approach is used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant