forked from dusty-nv/jetson-containers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wyoming-piper_cuda_path.diff
39 lines (37 loc) · 1.29 KB
/
wyoming-piper_cuda_path.diff
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
diff --git a/wyoming_piper/__main__.py b/wyoming_piper/__main__.py
index 08b20f1..f88312b 100755
--- a/wyoming_piper/__main__.py
+++ b/wyoming_piper/__main__.py
@@ -77,6 +77,15 @@ async def main() -> None:
version=__version__,
help="Print version and exit",
)
+ parser.add_argument(
+ "--cuda",
+ action="store_true",
+ help="Use GPU"
+ )
+ parser.add_argument(
+ "--espeak-data-dir",
+ help="Path to espeak-ng data directory"
+ )
args = parser.parse_args()
if not args.download_dir:
diff --git a/wyoming_piper/process.py b/wyoming_piper/process.py
index a7e90a7..98b0712 100644
--- a/wyoming_piper/process.py
+++ b/wyoming_piper/process.py
@@ -148,6 +148,14 @@ class PiperProcessManager:
if self.args.noise_w:
piper_args.extend(["--noise-w", str(self.args.noise_w)])
+ if self.args.espeak_data_dir:
+ piper_args.extend(["--espeak_data", str(self.args.espeak_data_dir)])
+
+ if self.args.cuda:
+ piper_args.extend(["--debug"])
+ piper_args.extend(["--cuda"])
+ piper_args.extend(["--use-cuda"])
+
_LOGGER.debug(
"Starting piper process: %s args=%s", self.args.piper, piper_args
)