whisper.net icon indicating copy to clipboard operation
whisper.net copied to clipboard

CoreML not working on Mac

Open jettoblack opened this issue 9 months ago • 15 comments

I'm trying to run the CoreML example project with no changes in VS Code. I have 2 ARM Macbook Pros: M1 Pro running latest macOS Sonoma 14.1.1, and a M2 Max running Ventura 13.6. Both machines can run the Simple example just fine, but both fail to load the native library for the CoreML example:

Unhandled exception. System.Exception: Failed to load native whisper library. Error: Unknown error at Whisper.net.WhisperFactory..ctor(IWhisperProcessorModelLoader loader, Boolean delayInit, String libraryPath, Boolean bypassLoading) at Whisper.net.WhisperFactory.FromPath(String path, Boolean delayInitialization, String libraryPath, Boolean bypassLoading) at Program.Main(String[] args) in /Users/jasonl/Downloads/whisper.net/examples/CoreML/Program.cs:line 35 at Program.<Main>(String[] args)

In ./bin/Debug/net6.0/runtimes/osx-arm64 I have: libwhisper.coreml.dylib whisper.dylib

I see both ggml-base.bin and ggml-base-encoder.mlmodelc downloaded and unpacked successfully. I tried copying these files to the bin or the runtimes/osx-arm64 folders so they are in the same place as the DLLs, but that didn't change anything.

I tried updating the projects to .net7, updating my build tools, etc. and nothing helped.

Is there any additional information I can provide that would be helpful for debugging? Thanks!

jettoblack avatar Nov 23 '23 17:11 jettoblack