gen-cards: regenerate Use-it block
Browse files
README.md
CHANGED
|
@@ -27,6 +27,48 @@ that denoises a latent over **8 rectified-flow steps**, then an Oobleck VAE deco
|
|
| 27 |
waveform. Distilled (ARC) for few-step generation, so it's fast.
|
| 28 |
|
| 29 |
<!-- gen-cards:use-it begin id=stable-audio-open-small (managed by scripts/gen-cards β edit cards.json / QuickStart.swift, not this block) -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
<!-- gen-cards:use-it end -->
|
| 31 |
|
| 32 |
## What's in the bundle (`macos/`)
|
|
|
|
| 27 |
waveform. Distilled (ARC) for few-step generation, so it's fast.
|
| 28 |
|
| 29 |
<!-- gen-cards:use-it begin id=stable-audio-open-small (managed by scripts/gen-cards β edit cards.json / QuickStart.swift, not this block) -->
|
| 30 |
+

|
| 31 |
+
*Stable Audio Open Small on iPhone 17 Pro β the zoo's coreai-audio app, 12 s of audio in ~1 s.*
|
| 32 |
+
|
| 33 |
+
## Use it
|
| 34 |
+
|
| 35 |
+
βΆοΈ **Run it (source)** β the [Music runner](https://github.com/john-rocky/coreai-kit/tree/main/Examples/Music)
|
| 36 |
+
(GUI + CLI, one app for every text-to-music model in the catalog):
|
| 37 |
+
|
| 38 |
+
```bash
|
| 39 |
+
git clone https://github.com/john-rocky/coreai-kit
|
| 40 |
+
open coreai-kit/Examples/Music/Music.xcodeproj
|
| 41 |
+
# β Run, then pick "Stable Audio Open Small" in the model picker
|
| 42 |
+
|
| 43 |
+
# agents / headless (macOS):
|
| 44 |
+
cd coreai-kit/Examples/Music
|
| 45 |
+
swift run music-cli --model stable-audio-open-small --prompt "128 BPM tech house drum loop" --output loop.wav
|
| 46 |
+
```
|
| 47 |
+
|
| 48 |
+
π» **Build with it** β complete; the glue is kit API, copy-paste runs:
|
| 49 |
+
|
| 50 |
+
```swift
|
| 51 |
+
import CoreAIKit
|
| 52 |
+
|
| 53 |
+
let musician = try await KitMusician(catalog: "stable-audio-open-small")
|
| 54 |
+
let audio = try await musician.generate(prompt)
|
| 55 |
+
// audio.samples: 44.1 kHz stereo (planar L/R) β play it or write a WAV
|
| 56 |
+
```
|
| 57 |
+
|
| 58 |
+
The take-home is [`Examples/Music/Sources/QuickStart.swift`](https://github.com/john-rocky/coreai-kit/blob/main/Examples/Music/Sources/QuickStart.swift)
|
| 59 |
+
β this exact code as one typed function, no UI; the CLI is an argument shell over it, and
|
| 60 |
+
the GUI drives the same `KitMusician(catalog:)` and plays the result.
|
| 61 |
+
Length? `generate(_:seconds:)` up to the model's ~11 s window. The WAV container is your
|
| 62 |
+
app's territory (the runner ships a 30-line writer with planar-stereo support).
|
| 63 |
+
|
| 64 |
+
**Integration checklist**
|
| 65 |
+
|
| 66 |
+
- SPM: `https://github.com/john-rocky/coreai-kit` β product **CoreAIKit**
|
| 67 |
+
- Info.plist: none needed
|
| 68 |
+
- Entitlements: none needed (macOS)
|
| 69 |
+
- First run downloads the model β 1.1 GB (Mac) β then it loads from the
|
| 70 |
+
local cache (Application Support; progress via the `downloadProgress` callback)
|
| 71 |
+
- Measure in Release β Debug is ~3Γ slower on per-token host work
|
| 72 |
<!-- gen-cards:use-it end -->
|
| 73 |
|
| 74 |
## What's in the bundle (`macos/`)
|