bark.cpp/examples/bark.swiftui
2024-05-12 15:54:02 +02:00
..
bark_swift_package example : bark.swiftui (#169) 2024-05-10 14:03:00 +02:00
bark.swiftui doc : video demo on the iPhone (#174) 2024-05-12 15:54:02 +02:00
bark.swiftui.xcodeproj enh : add progress callback (#173) 2024-05-10 20:57:34 +02:00
.gitignore example : bark.swiftui (#169) 2024-05-10 14:03:00 +02:00
bark-swiftui-Info.plist example : bark.swiftui (#169) 2024-05-10 14:03:00 +02:00
README.md doc : video demo on the iPhone (#174) 2024-05-12 15:54:02 +02:00

A sample SwiftUI app using bark.cpp to do audio generation locally.

Usage:

  1. Select a model from the bark.cpp repository.1
  2. Add the model to bark.swiftui/ via Xcode. If you drag and drop the model in the Xcode project outside of Xcode, the model weights won't be automatically added to the target.
  3. Select the "Release" 2 build configuration under "Run", then deploy and run to your device.

Note: Pay attention to the folder path: whisper.swiftui.demo/Resources/models is the appropriate directory to place resources whilst whisper.swiftui.demo/Models is related to actual code.

https://github.com/PABannier/bark.cpp/assets/12958149/bc807c0b-adfa-4c47-a05b-a2d8ba157dd8


  1. I recommend the Bark small model for running on an iOS device. ↩︎

  2. The Release build can boost performance of audio generation. In this project, it also added -O3 -DNDEBUG to Other C Flags, but adding flags to app proj is not ideal in real world (applies to all C/C++ files), consider splitting xcodeproj in workspace in your own project. ↩︎