Fall back to libespeak-ng.so.1
This commit is contained in:
parent
f94f10d5bf
commit
056f93e355
1 changed files with 6 additions and 1 deletions
|
|
@ -132,7 +132,12 @@ class Phonemizer:
|
||||||
self.libc = ctypes.cdll.LoadLibrary("libc.so.6")
|
self.libc = ctypes.cdll.LoadLibrary("libc.so.6")
|
||||||
self.libc.open_memstream.restype = ctypes.POINTER(ctypes.c_char)
|
self.libc.open_memstream.restype = ctypes.POINTER(ctypes.c_char)
|
||||||
|
|
||||||
self.lib_espeak = ctypes.cdll.LoadLibrary("libespeak-ng.so")
|
try:
|
||||||
|
self.lib_espeak = ctypes.cdll.LoadLibrary("libespeak-ng.so")
|
||||||
|
except OSError:
|
||||||
|
# Try .so.1
|
||||||
|
self.lib_espeak = ctypes.cdll.LoadLibrary("libespeak-ng.so.1")
|
||||||
|
|
||||||
sample_rate = self.lib_espeak.espeak_Initialize(
|
sample_rate = self.lib_espeak.espeak_Initialize(
|
||||||
Phonemizer.AUDIO_OUTPUT_SYNCHRONOUS, 0, None, 0
|
Phonemizer.AUDIO_OUTPUT_SYNCHRONOUS, 0, None, 0
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue