Skip to content

Commit

Permalink
piper: Apply patch to build with onnxruntime 1.15.1
Browse files Browse the repository at this point in the history
  • Loading branch information
cbourjau authored and mweinelt committed Aug 2, 2023
1 parent a21ee82 commit 6ae62cd
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkgs/tools/audio/piper/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 6ae62cd

Please sign in to comment.