Spaces:
Running
Running
docs : add xcframework section to README.md [no ci] (#2997)
Browse filesThis adds a section to the README.md file that describes how to use the
XCFramework.
The modification for this is that is not obvious how to use the
XCFramework and and example will help.
One thing to note is that the example is using the latest release
including the checksum. We are thinking about how we might automate
this in the future but for now this is a good start.
README.md
CHANGED
|
@@ -647,6 +647,33 @@ For more details, see the conversion script [models/convert-pt-to-ggml.py](model
|
|
| 647 |
- [x] R: [bnosac/audio.whisper](https://github.com/bnosac/audio.whisper)
|
| 648 |
- [x] Unity: [macoron/whisper.unity](https://github.com/Macoron/whisper.unity)
|
| 649 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 650 |
## Examples
|
| 651 |
|
| 652 |
There are various examples of using the library for different projects in the [examples](examples) folder.
|
|
|
|
| 647 |
- [x] R: [bnosac/audio.whisper](https://github.com/bnosac/audio.whisper)
|
| 648 |
- [x] Unity: [macoron/whisper.unity](https://github.com/Macoron/whisper.unity)
|
| 649 |
|
| 650 |
+
## XCFramework
|
| 651 |
+
The XCFramework is a precompiled version of the library for iOS, visionOS, tvOS,
|
| 652 |
+
and macOS. It can be used in Swift projects without the need to compile the
|
| 653 |
+
library from source. For examples:
|
| 654 |
+
```swift
|
| 655 |
+
// swift-tools-version: 5.10
|
| 656 |
+
// The swift-tools-version declares the minimum version of Swift required to build this package.
|
| 657 |
+
|
| 658 |
+
import PackageDescription
|
| 659 |
+
|
| 660 |
+
let package = Package(
|
| 661 |
+
name: "Whisper",
|
| 662 |
+
targets: [
|
| 663 |
+
.executableTarget(
|
| 664 |
+
name: "Whisper",
|
| 665 |
+
dependencies: [
|
| 666 |
+
"WhisperFramework"
|
| 667 |
+
]),
|
| 668 |
+
.binaryTarget(
|
| 669 |
+
name: "WhisperFramework",
|
| 670 |
+
url: "https://github.com/ggerganov/whisper.cpp/releases/download/v1.7.5/whisper-v1.7.5-xcframework.zip",
|
| 671 |
+
checksum: "c7faeb328620d6012e130f3d705c51a6ea6c995605f2df50f6e1ad68c59c6c4a"
|
| 672 |
+
)
|
| 673 |
+
]
|
| 674 |
+
)
|
| 675 |
+
```
|
| 676 |
+
|
| 677 |
## Examples
|
| 678 |
|
| 679 |
There are various examples of using the library for different projects in the [examples](examples) folder.
|