Closed brytonsf closed 1 year ago
Closed, I'm going to try https://github.com/exPHAT/SwiftWhisper or use a python wrapper if that fails.
Here are the steps:
let ctx = whisper_init_from_file("models/for-tests-ggml-base.en.bin")
line with the following two lines:let fileURL = Bundle.main.url(forResource: "for-tests-ggml-base.en", withExtension: "bin")
let ctx = whisper_init_from_file(fileURL?.path(percentEncoded: true))
Then hit run!
Hello.
I seem to be unable to get past this stage:
let ctx = whisper_init_from_file("models/for-tests-ggml-base.en.bin")
I'm able to run
in terminal and have everything work properly. But when I simply run a MacOS app in Xcode using Whisper as a package dependency, the model fails to load:
whisper_init_from_file_no_state: failed to open 'models/for-tests-ggml-base.en.bin'
I've tried using absolute paths on my filesystem and using a different model binary, but I've got the same results each time.
Does anyone have any thoughts/advice? What can I learn to figure this out?