Skip to content

Commit

Permalink
Attempt to fix build on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
raivisdejus committed Nov 3, 2024
1 parent e72cfce commit 45a2ba6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 9 additions & 6 deletions buzz/transcriber/whisper_cpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Check warning on line 19 in buzz/transcriber/whisper_cpp.py

View check run for this annotation

Codecov / codecov/patch

buzz/transcriber/whisper_cpp.py#L19

Added line #L19 was not covered by tests

IS_COREML_SUPPORTED = True

Check warning on line 21 in buzz/transcriber/whisper_cpp.py

View check run for this annotation

Codecov / codecov/patch

buzz/transcriber/whisper_cpp.py#L21

Added line #L21 was not covered by tests
# try:
# from buzz import whisper_cpp_coreml # noqa: F401
#
# IS_COREML_SUPPORTED = True
# except ImportError:
# logging.exception("")


class WhisperCpp:
Expand Down

0 comments on commit 45a2ba6

Please sign in to comment.