diff options
author | Christian Bourjau <christian.bourjau@quantco.com> | 2023-07-30 12:00:18 +0200 |
---|---|---|
committer | Martin Weinelt <hexa@darmstadt.ccc.de> | 2023-08-03 01:10:08 +0200 |
commit | 6ae62cd2c872d594cf56b70f90235aaef2d7ab11 (patch) | |
tree | 2e0212ade908ce27e9f46045c6db80c5b4342e9a /pkgs/tools/audio/piper | |
parent | a21ee82a38fa6a37800bc963e5943a31a614450e (diff) |
piper: Apply patch to build with onnxruntime 1.15.1
Diffstat (limited to 'pkgs/tools/audio/piper')
-rw-r--r-- | pkgs/tools/audio/piper/default.nix | 4 | ||||
-rw-r--r-- | pkgs/tools/audio/piper/fix-compilation-with-newer-onnxruntime.patch | 18 |
2 files changed, 22 insertions, 0 deletions
diff --git a/pkgs/tools/audio/piper/default.nix b/pkgs/tools/audio/piper/default.nix index df8ed3e969e7d..c3d8a7638304d 100644 --- a/pkgs/tools/audio/piper/default.nix +++ b/pkgs/tools/audio/piper/default.nix @@ -25,6 +25,10 @@ stdenv.mkDerivation { sourceRoot = "source/src/cpp"; + patches = [ + ./fix-compilation-with-newer-onnxruntime.patch + ]; + postPatch = '' substituteInPlace CMakeLists.txt \ --replace "/usr/local/include/onnxruntime" "${onnxruntime}" diff --git a/pkgs/tools/audio/piper/fix-compilation-with-newer-onnxruntime.patch b/pkgs/tools/audio/piper/fix-compilation-with-newer-onnxruntime.patch new file mode 100644 index 0000000000000..9d2e46bb4e912 --- /dev/null +++ b/pkgs/tools/audio/piper/fix-compilation-with-newer-onnxruntime.patch @@ -0,0 +1,18 @@ +diff --git a/src/cpp/synthesize.hpp b/src/cpp/synthesize.hpp +index ef61aef..4c7db7a 100644 +--- a/synthesize.hpp ++++ b/synthesize.hpp +@@ -119,11 +119,11 @@ void synthesize(SynthesisConfig &synthesisConfig, ModelSession &session, + + // Clean up + for (size_t i = 0; i < outputTensors.size(); i++) { +- Ort::OrtRelease(outputTensors[i].release()); ++ Ort::detail::OrtRelease(outputTensors[i].release()); + } + + for (size_t i = 0; i < inputTensors.size(); i++) { +- Ort::OrtRelease(inputTensors[i].release()); ++ Ort::detail::OrtRelease(inputTensors[i].release()); + } + } + } // namespace larynx |