wyoming-piper-gpu/patch/wyoming-piper_cuda.patch

35 lines
1.2 KiB
Diff

--- __main__.py 2025-01-04 17:48:27.645862671 +0000
+++ __main__.py.patched 2025-01-04 17:51:50.193357609 +0000
@@ -66,6 +66,15 @@
help="Download latest voices.json during startup",
)
#
+ parser.add_argument(
+ "--cuda",
+ action="store_true",
+ help="Use GPU"
+ )
+ parser.add_argument(
+ "--espeak-data-dir",
+ help="Path to espeak-ng data directory"
+ )
parser.add_argument("--debug", action="store_true", help="Log DEBUG messages")
args = parser.parse_args()
--- process.py 2025-01-04 17:48:27.653862810 +0000
+++ process.py.patched 2025-01-04 17:52:48.494362993 +0000
@@ -148,6 +148,14 @@
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
)