-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CoreML support? #18
Comments
Whisper.cpp now has CoreML support: Using just with whisper.cpp, should be as simple as compiling with the appropriate flags: cd build
cmake -DWHISPER_COREML=1 .. Check by running: ./main -m models/ggml-base.en.bin -f samples/gb0.wav
...
whisper_init_state: loading Core ML model from 'models/ggml-base.en-encoder.mlmodelc'
whisper_init_state: first run on a device may take a while ...
whisper_init_state: Core ML model loaded
system_info: n_threads = 4 / 10 | AVX = 0 | AVX2 = 0 | AVX512 = 0 | FMA = 0 | NEON = 1 | ARM_FMA = 1 | F16C = 0 | FP16_VA = 1 | WASM_SIMD = 0 | BLAS = 1 | SSE3 = 0 | VSX = 0 | COREML = 1 |
... note: For if sys.platform == 'darwin':
os.environ['CFLAGS'] = '-DWHISPER_COREML=1 -DGGML_USE_ACCELERATE -O3 -std=gnu11'
os.environ['CXXFLAGS'] = '-DWHISPER_COREML=1 -DGGML_USE_ACCELERATE -O3 -std=c++11'
os.environ['LDFLAGS'] = '-framework Accelerate' First update the submodule inside whispercpp.py for whisper.cpp. Check that it still runs, it might need some changes if the API has changed. Given it still works, add the flag inside setup.py. I can't test this at the moment, but feel free to make the pull request, and we can get this feature added. |
Thx! |
I have verified that my computer is an M2. I found that CoreML does not seem to be enabled through this command. I also added this compile flag, which also does not seem to work:
That is, I added
It |
How can we add CoreML support? Thx!
The text was updated successfully, but these errors were encountered: