diff --git a/Dockerfile b/Dockerfile index b338011..fcbef1e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -50,10 +50,12 @@ RUN \ # Patch to enable CUDA arguments for piper -COPY patch/* /tmp/ +COPY patches/* /tmp/ RUN \ cd /app/lib/python3.10/site-packages/wyoming_piper/;\ for file in /tmp/wyoming_piper*.diff;do patch -p0 --forward < $file;done;\ + cd /app/lib/python3.10/site-packages/piper;\ + for file in /tmp/piper*.diff;do patch -p0 --forward < $file;done;\ true # Clean up diff --git a/patches/piper_voice.diff b/patches/piper_voice.diff new file mode 100644 index 0000000..10affe8 --- /dev/null +++ b/patches/piper_voice.diff @@ -0,0 +1,11 @@ +--- voice.py 2025-01-04 19:49:49.000000000 +0000 ++++ voice.patched 2025-01-04 21:54:21.970873501 +0000 +@@ -41,7 +41,7 @@ + sess_options=onnxruntime.SessionOptions(), + providers=["CPUExecutionProvider"] + if not use_cuda +- else ["CUDAExecutionProvider"], ++ else [("CUDAExecutionProvider", {"cudnn_conv_algo_search": "HEURISTIC"})], + ), + ) +