You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 that project, I'm posting this both here and there.) 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 folder whisper.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 out whisper.cpp @ 95b02d7 which 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 .h and .cpp files 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 .swift files from SwiftWhisper (and also replacing import whisper_cpp with import whisper), and while the project compiles, at runtime macOS shows a warning about not being able to check whisper.framework for 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.
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!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
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 that project, I'm posting this both here and there.) So I was wondering how to make it use the most recent whisper.cpp release.I tried the following:
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.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 @ 95b02d7
which can be seen in the root folder on GitHub. Is this some setting in GitHub that is not saved in the project files?.h
and.cpp
files 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.README.md
, add it to my main Xcode project, and add the.swift
files from SwiftWhisper (and also replacingimport whisper_cpp
withimport whisper
), and while the project compiles, at runtime macOS shows a warning about not being able to checkwhisper.framework
for 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.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!
Beta Was this translation helpful? Give feedback.
All reactions