diff --git a/build.py b/build.py index b83c18e11..87316f16e 100644 --- a/build.py +++ b/build.py @@ -505,6 +505,13 @@ def update(args: argparse.Namespace, env: dict[str, str]): "-DPLATFORM_NAME=" + platform_name, ] + if args.ios or args.macos == "Catalyst" or args.build_apple_framework: + command += [ + "-DENABLE_PYTHON=OFF", + "-DENABLE_TESTS=OFF", + "-DENABLE_MODEL_BENCHMARK=OFF", + ] + if args.macos: command += [ f"-DCMAKE_OSX_SYSROOT={args.apple_sysroot}", @@ -531,9 +538,6 @@ def _get_opencv_toolchain_file(): f"-DIPHONEOS_DEPLOYMENT_TARGET={args.apple_deploy_target}", # The following arguments are specific to the OpenCV toolchain file f"-DCMAKE_TOOLCHAIN_FILE={_get_opencv_toolchain_file()}", - "-DENABLE_PYTHON=OFF", - "-DENABLE_TESTS=OFF", - "-DENABLE_MODEL_BENCHMARK=OFF", ] if args.macos == "Catalyst": @@ -552,9 +556,6 @@ def _get_opencv_toolchain_file(): f"-DCMAKE_CC_FLAGS=--target={macabi_target}", f"-DCMAKE_CC_FLAGS_RELEASE=-O3 -DNDEBUG --target={macabi_target}", "-DMAC_CATALYST=1", - "-DENABLE_PYTHON=OFF", - "-DENABLE_TESTS=OFF", - "-DENABLE_MODEL_BENCHMARK=OFF", ] if args.arm64: diff --git a/cmake/deps.txt b/cmake/deps.txt index 6e504c9a7..500cdc334 100644 --- a/cmake/deps.txt +++ b/cmake/deps.txt @@ -14,4 +14,4 @@ pybind11;https://github.com/pybind/pybind11/archive/refs/tags/v2.10.1.zip;769b6a googletest;https://github.com/google/googletest/archive/530d5c8c84abd2a46f38583ee817743c9b3a42b4.zip;5e3a61db2aa975cfd0f97ba92c818744e7fa7034 microsoft_wil;https://github.com/microsoft/wil/archive/refs/tags/v1.0.230629.1.zip;e4a542a323c070376f7c2d1973d0f7ddbc1d2fa5 directx_headers;https://github.com/microsoft/DirectX-Headers/archive/refs/tags/v1.613.1.zip;47653509a3371eabb156360f42faf582f314bf2e -onnxruntime_extensions;https://github.com/microsoft/onnxruntime-extensions.git;2c3e936cfc3401ba7ebb79d02b9e52a50439ffc3 +onnxruntime_extensions;https://github.com/microsoft/onnxruntime-extensions.git;4e10ee046a2f035351f3fe88740bd8215a18fdb9 diff --git a/src/models/audio_processor.cpp b/src/models/audio_processor.cpp index 3b0ac53ed..1c6c88d14 100644 --- a/src/models/audio_processor.cpp +++ b/src/models/audio_processor.cpp @@ -45,7 +45,7 @@ std::unique_ptr LoadAudios(const std::span& audio_pat } } ort_extensions::OrtxObjectPtr audios; - CheckResult(OrtxLoadAudios(ort_extensions::ptr(audios), audio_paths.data(), audio_paths.size())); + CheckResult(OrtxLoadAudios(audios.ToBeAssigned(), audio_paths.data(), audio_paths.size())); return std::make_unique(std::move(audios), audio_paths.size()); } @@ -68,10 +68,10 @@ std::unique_ptr AudioProcessor::Process(const Audios* audios) cons auto named_tensors = std::make_unique(); ort_extensions::OrtxObjectPtr result; - CheckResult(OrtxSpeechLogMel(processor_.get(), audios->audios_.get(), ort_extensions::ptr(result))); + CheckResult(OrtxSpeechLogMel(processor_.get(), audios->audios_.get(), result.ToBeAssigned())); ort_extensions::OrtxObjectPtr mel; - CheckResult(OrtxTensorResultGetAt(result.get(), 0, ort_extensions::ptr(mel))); + CheckResult(OrtxTensorResultGetAt(result.get(), 0, mel.ToBeAssigned())); named_tensors->emplace(std::string(Config::Defaults::InputFeaturesName), std::make_shared(ProcessMel(mel, input_features_type_, allocator)));