about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/phonemizer/backend-paths.patch
blob: 5f828aaaae13f4b29ca7e4d7719e1da4ea9a7024 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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(