openai-whisper-cpp: enable CoreML support

Co-authored-by: wegank <9713184+wegank@users.noreply.github.com>
This commit is contained in:
David Knaack 2023-06-26 11:00:47 +02:00
parent e3cbd650f5
commit 44ecf1cd18
2 changed files with 6 additions and 3 deletions

View File

@ -6,6 +6,7 @@
, wget
, Accelerate
, CoreGraphics
, CoreML
, CoreVideo
}:
@ -28,8 +29,10 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ SDL2 ] ++ lib.optionals stdenv.isDarwin [ Accelerate CoreGraphics CoreVideo ];
buildInputs = [ SDL2 ] ++ lib.optionals stdenv.isDarwin [ Accelerate CoreGraphics CoreML CoreVideo ];
WHISPER_COREML = lib.optionalString stdenv.isDarwin "1";
WHISPER_COREML_ALLOW_FALLBACK = lib.optionalString stdenv.isDarwin "1";
makeFlags = [ "main" "stream" ];
installPhase = ''

View File

@ -19168,8 +19168,8 @@ with pkgs;
openai-whisper = with python3.pkgs; toPythonApplication openai-whisper;
openai-whisper-cpp = callPackage ../tools/audio/openai-whisper-cpp {
inherit (darwin.apple_sdk.frameworks) Accelerate CoreGraphics CoreVideo;
openai-whisper-cpp = darwin.apple_sdk_11_0.callPackage ../tools/audio/openai-whisper-cpp {
inherit (darwin.apple_sdk_11_0.frameworks) Accelerate CoreGraphics CoreML CoreVideo;
};
opengrok = callPackage ../development/tools/misc/opengrok { };