PABannier / bark.cpp

Suno AI's Bark model in C/C++ for fast text-to-speech
MIT License
630 stars 48 forks source link

Add support for Swift Package Manager #159

Closed sindresorhus closed 1 month ago

sindresorhus commented 2 months ago

This would make it much easier to use the package in Swift projects like iOS or macOS apps.

Could do something similar to what's done in Whisper.cpp: https://github.com/ggerganov/whisper.cpp/blob/master/Package.swift

PABannier commented 1 month ago

Hi @sindresorhus ! I just merged #169 which adds an example on SwiftUI. I'll have a look at your issues #157 and #158 later today ;)

sindresorhus commented 1 month ago

@PABannier Thank you 👍

However, the Package.swift is not working. The example project is not actually testing Package.swift because it uses a lot of symlinks instead. The correct way to use a local Swift package is to simply drag the folder of the package (the top-level "bark.cpp" folder) into the sidebar of Xcode (under "bark.swiftui). Then it should show up as a package there. Then delete the symlinks. I would have done a PR, but it fails to build after that, and I'm not familiar enough with a C++ project to fix it...