-
Notifications
You must be signed in to change notification settings - Fork 447
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
RuntimeError: espeak not installed on your system #297
Comments
Can this code also be used to teach Persian? |
@fontnet1
|
ممنون |
@anurag12-webster |
It doesn't matter where you install espeak-ng. You just have to set environmental variables properly in order to use it. For Linux I set those two: import os
os.environ["PHONEMIZER_ESPEAK_LIBRARY"] = "/home/alsenderovich/lib/libespeak-ng.so"
os.environ["ESPEAK_DATA_PATH"] = "/home/alsenderovich/share/espeak-ng-data" There are some discussions on github about this, you can find some advice for Windows users there: bootphon/phonemizer#117, rhasspy/piper#73, bootphon/phonemizer#44 |
RuntimeError Traceback (most recent call last)
Cell In[18], line 66
64 # load phonemizer
65 import phonemizer
---> 66 global_phonemizer = phonemizer.backend.EspeakBackend(language='en-us', preserve_punctuation=True, with_stress=True)
68 config = yaml.safe_load(open("Models/LibriTTS/config.yml"))
70 # load pretrained ASR model
File c:\Users\Abbasian\Desktop\ps VsCode\FONT4_Vnve\Lib\site-packages\phonemizer\backend\espeak\espeak.py:45, in EspeakBackend.init(self, language, punctuation_marks, preserve_punctuation, with_stress, tie, language_switch, words_mismatch, logger)
37 def init(self, language: str,
38 punctuation_marks: Optional[Union[str, Pattern]] = None,
39 preserve_punctuation: bool = False,
(...)
43 words_mismatch: WordMismatch = 'ignore',
44 logger: Optional[Logger] = None):
---> 45 super().init(
46 language, punctuation_marks=punctuation_marks,
47 preserve_punctuation=preserve_punctuation, logger=logger)
49 self._espeak.set_voice(language)
50 self._with_stress = with_stress
File c:\Users\Abbasian\Desktop\ps VsCode\FONT4_Vnve\Lib\site-packages\phonemizer\backend\espeak\base.py:39, in BaseEspeakBackend.init(self, language, punctuation_marks, preserve_punctuation, logger)
35 def init(self, language: str,
36 punctuation_marks: Optional[Union[str, Pattern]] = None,
37 preserve_punctuation: bool = False,
38 logger: Optional[Logger] = None):
---> 39 super().init(
40 language,
41 punctuation_marks=punctuation_marks,
42 preserve_punctuation=preserve_punctuation,
43 logger=logger)
45 self._espeak = EspeakWrapper()
46 self.logger.debug('loaded %s', self._espeak.library_path)
File c:\Users\Abbasian\Desktop\ps VsCode\FONT4_Vnve\Lib\site-packages\phonemizer\backend\base.py:77, in BaseBackend.init(self, language, punctuation_marks, preserve_punctuation, logger)
75 # ensure the backend is installed on the system
76 if not self.is_available():
---> 77 raise RuntimeError( # pragma: nocover
78 '{} not installed on your system'.format(self.name()))
80 self._logger = logger
81 self._logger.info(
82 'initializing backend %s-%s',
83 self.name(), '.'.join(str(v) for v in self.version()))
The text was updated successfully, but these errors were encountered: