piper: Apply patch to build with onnxruntime 1.15.1
This commit is contained in:
parent
a21ee82a38
commit
6ae62cd2c8
2 changed files with 22 additions and 0 deletions
|
@ -25,6 +25,10 @@ stdenv.mkDerivation {
|
||||||
|
|
||||||
sourceRoot = "source/src/cpp";
|
sourceRoot = "source/src/cpp";
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
./fix-compilation-with-newer-onnxruntime.patch
|
||||||
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace CMakeLists.txt \
|
substituteInPlace CMakeLists.txt \
|
||||||
--replace "/usr/local/include/onnxruntime" "${onnxruntime}"
|
--replace "/usr/local/include/onnxruntime" "${onnxruntime}"
|
||||||
|
|
|
@ -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
|
Loading…
Reference in a new issue