From 45a2ba6cace4ff5a100b4402bef8f636fd94c144 Mon Sep 17 00:00:00 2001 From: Raivis Dejus Date: Sun, 3 Nov 2024 11:07:56 +0200 Subject: [PATCH] Attempt to fix build on CI --- Makefile | 1 + buzz/transcriber/whisper_cpp.py | 15 +++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index f3d8279f5..b05a7db07 100644 --- a/Makefile +++ b/Makefile @@ -97,6 +97,7 @@ ifeq ($(shell uname -s), Darwin) rm -rf whisper.cpp/build || true cmake -S whisper.cpp -B whisper.cpp/build/ $(CMAKE_FLAGS) -DWHISPER_COREML=1 -DCMAKE_OSX_ARCHITECTURES="arm64" cmake --build whisper.cpp/build --verbose + cp whisper.cpp/build/bin/Debug/$(LIBWHISPER) buzz/libwhisper-coreml.dylib || true cp whisper.cpp/build/$(LIBWHISPER) buzz/libwhisper-coreml.dylib || true endif endif diff --git a/buzz/transcriber/whisper_cpp.py b/buzz/transcriber/whisper_cpp.py index c8252542b..f063f2ee5 100644 --- a/buzz/transcriber/whisper_cpp.py +++ b/buzz/transcriber/whisper_cpp.py @@ -16,12 +16,15 @@ IS_COREML_SUPPORTED = False if platform.system() == "Darwin" and platform.machine() == "arm64": - try: - from buzz import whisper_cpp_coreml # noqa: F401 - - IS_COREML_SUPPORTED = True - except ImportError: - logging.exception("") + from buzz import whisper_cpp_coreml # noqa: F401 + + IS_COREML_SUPPORTED = True + # try: + # from buzz import whisper_cpp_coreml # noqa: F401 + # + # IS_COREML_SUPPORTED = True + # except ImportError: + # logging.exception("") class WhisperCpp: