CoreAIKit

Music — text-to-music generation on device

A prompt in, audio out, fully on device. “128 BPM tech house drum loop” becomes a wav you can play or drop into a project. The model is Stable Audio Open Small, which generates faster than real time on an iPhone.

The whole ML surface is one call:

let musician = try await KitMusician(catalog: "stable-audio-open-small")
let audio = try await musician.compose(prompt, seconds: 11)

Sources/QuickStart.swift is the take-home version of that — prompt in, SpokenAudio out, no UI — and both the app and the CLI are shells over it.

Run

swift run music-cli --prompt "128 BPM tech house drum loop" --output loop.wav

xcodegen generate                      # app
open Music.xcodeproj

First use downloads the model from the Hugging Face Hub; later runs load from the local cache.

Notes