-
Notifications
You must be signed in to change notification settings - Fork 102
Open
Description
I tried out SwiftWhisper, but since it hasn't been updated in over 2 years and still uses the old 1.2.0 version of whisper.cpp, it has some issues, like crashes happening at whisper_model_load when using some of the models (Turbo, or any q_8_x). (Because of the lack of recent updates for this project, I'm posting this both here and on whisper.cpp.) So I was wondering how to make it use the most recent whisper.cpp release.
I tried the following:
- Check out SwiftWhisper and open it in Xcode, but building it produces a compiler error
No such module 'whisper_cpp'. The folderwhisper.cpp, which, when adding SwiftWhisper as a package dependency to my main Xcode project, is populated with files, is in fact empty. - Check out SwiftWhisper and add it as a project dependency to my main Xcode project, but again I get the compiler error
No such module 'whisper_cpp'. Also for the life of me I cannot figure out where SwiftWhisper declares the link where to check outwhisper.cpp @ 95b02d7which can be seen in the root folder on GitHub. Is this some setting in GitHub that is not saved in the project files? - Add the whisper.cpp
.hand.cppfiles to my main Xcode project like SwiftWhisper seems to do, but that doesn't seem to do anything. I would have assumed that a bridging header or something is necessary, but cannot see anything like that in SwiftWhisper. - Download the XCFramework as mentioned in
README.md, add it to my main Xcode project, and add the.swiftfiles from SwiftWhisper (and also replacingimport whisper_cppwithimport whisper), and while the project compiles, at runtime macOS shows a warning about not being able to checkwhisper.frameworkfor malware and gives me the option to move it to the bin. To open it nonetheless, I can open System Settings > Privacy & Security and at the bottom click Open Anyway. Running the project again then makes it crash at runtime. After some research I found that adding the following entitlement solves the issue, but it doesn't feel right to include it in a production app (and perhaps it's not even allowed on the App Store). When running the project again, I get again the macOS malware warning and have to allow it again.
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
- Research if it's possible to add a CMake project as an Xcode subproject, but couldn't find anything that worked.
Does anyone know how to include whisper.cpp in a Swift Xcode project? Ideally without using XCFramework, so that it can be debugged and possibly optimized. Thanks in advance for any input!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels