Merge pull request #239899 from davidkna/whispercpp-coreml

openai-whisper-cpp: enable CoreML support
This commit is contained in:
Weijia Wang
2023-06-26 15:37:33 +02:00
committed by GitHub
2 changed files with 6 additions and 3 deletions
@@ -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 = ''
+2 -2
View File
@@ -19170,8 +19170,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 { };