From b197f18d35e8693deea56f7ebe668c9e92718c3d Mon Sep 17 00:00:00 2001 From: Robert Dunmire III Date: Sat, 4 Jan 2025 12:29:30 -0500 Subject: [PATCH] Create wyoming-piper_cuda.patch --- patch/wyoming-piper_cuda.patch | 39 ++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 patch/wyoming-piper_cuda.patch diff --git a/patch/wyoming-piper_cuda.patch b/patch/wyoming-piper_cuda.patch new file mode 100644 index 0000000..d11b30c --- /dev/null +++ b/patch/wyoming-piper_cuda.patch @@ -0,0 +1,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 + ) \ No newline at end of file