mirror of
https://github.com/slackr31337/wyoming-piper-gpu.git
synced 2026-10-22 05:57:39 +02:00
Create wyoming-piper_cuda.patch
This commit is contained in:
@@ -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
|
||||
)
|
||||
Reference in New Issue
Block a user