My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nomicon/pkgs/development/python-modules/phonemizer/backend-paths.patch

43 lines
1.5 KiB

diff --git a/phonemizer/backend/espeak.py b/phonemizer/backend/espeak.py
index b4712bf..5628fd5 100644
--- a/phonemizer/backend/espeak.py
+++ b/phonemizer/backend/espeak.py
@@ -82,10 +82,7 @@ class BaseEspeakBackend(BaseBackend):
if _ESPEAK_DEFAULT_PATH:
return _ESPEAK_DEFAULT_PATH
- espeak = distutils.spawn.find_executable('espeak-ng')
- if not espeak: # pragma: nocover
- espeak = distutils.spawn.find_executable('espeak')
- return espeak
+ return "@espeak@"
@classmethod
def is_available(cls):
diff --git a/phonemizer/backend/festival.py b/phonemizer/backend/festival.py
index 3037be5..684ffff 100644
--- a/phonemizer/backend/festival.py
+++ b/phonemizer/backend/festival.py
@@ -80,7 +80,7 @@ class FestivalBackend(BaseBackend):
if _FESTIVAL_DEFAULT_PATH:
return _FESTIVAL_DEFAULT_PATH
- return distutils.spawn.find_executable('festival')
+ return "@festival@"
@classmethod
def is_available(cls):
diff --git a/test/test_punctuation.py b/test/test_punctuation.py
index 6ed642a..08060df 100644
--- a/test/test_punctuation.py
+++ b/test/test_punctuation.py
@@ -28,7 +28,7 @@ ESPEAK_143 = (EspeakBackend.version(as_tuple=True) >= (1, 49, 3))
ESPEAK_150 = (EspeakBackend.version(as_tuple=True) >= (1, 50))
# True if we are using festival>=2.5
-FESTIVAL_25 = (FestivalBackend.version(as_tuple=True) >= (2, 5))
+FESTIVAL_25 = False
@pytest.mark.parametrize(