OpenBMB VoxCPM2 (2B) converted to Apple Core AI, running
fully on-device on iPhone (A19 Pro / iPhone 17 Pro) and Mac — no network. The 2B, 48 kHz successor to
VoxCPM-0.5B-CoreAI.
A tokenizer-free diffusion TTS: a MiniCPM4 28-layer text-semantic LM + an 8-layer residual acoustic
LM drive a 12-layer LocDiT flow-matching diffusion head, decoded by a 48 kHz AudioVAE. Five Core AI
bundles + a few host-side projections.
Use it
⚡ One line — run the kit's task op on this model
(import CoreAIOps; no session, no model plumbing, downloads on first use):
let audio = try await CoreAI.speak(text, options: .model("voxcpm2-2b"))
▶️ Run it (source) — the Speak runner
(GUI + CLI, one app for every text-to-speech model in the catalog):
bash
1git clone https://github.com/john-rocky/coreai-kit
2open coreai-kit/Examples/Speak/Speak.xcodeproj
3# → Run, then pick "VoxCPM2 2B" in the model picker45# agents / headless (macOS):6cd coreai-kit/Examples/Speak
7swift run speak-cli --model voxcpm2-2b --text "Hello from Core AI." --output hello.wav
💻 Build with it — complete; the glue is kit API, copy-paste runs:
swift
1importCoreAIKit23let speaker =tryawaitKitSpeaker(catalog:"voxcpm2-2b")4let audio =tryawait speaker.synthesize(text)5// audio.samples: 48 kHz mono PCM in [-1, 1] — play it or write a WAV
The take-home is Examples/Speak/Sources/QuickStart.swift
— this exact code as one typed function, no UI; the CLI is an argument shell over it, and
the GUI drives the same KitSpeaker(catalog:) and plays the samples.
Live playback? synthesizeStreaming(_:onChunk:) hands you ~0.5 s chunks as they decode,
so audio starts before the whole clip exists. The WAV container is your app's territory
(the runner ships a 20-line writer).
First run downloads the model — 4.7 GB (Mac) / 5.7 GB (iPhone) — then it loads from the
local cache (Application Support; progress via the downloadProgress callback)
Measure in Release — Debug is ~3× slower on per-token host work
The backbone LMs are weight-only int8 (the size driver); the diffusion + VAE stay fp16 (the
continuous-feedback path is quant-sensitive — same split mlx-community uses).
Streaming starts after the first ~0.65 s; the 2B is ~4× the 0.5B, so RTF sits just above realtime.
Use it
Runs through coreai-kitVoxCPM2TTS, wired into the
coreai-model-zoocoreai-audio app ("Voice 2B" tab).
Conversion + gates + export scripts: coreai-model-zoo/conversion/voxcpm/ (*_v2.py).
swift
1let tts =tryawaitVoxCPM2TTS(paths:.standard(artifactsRoot: root, lm:.int8))2let wav =tryawait tts.synthesize("On device speech synthesis, running entirely on your iPhone.")// 48 kHz Float PCM
Verification
Reimplemented in exportable Core AI overlays and gated end-to-end against the official model: backbone /
feat_decoder / feat_encoder cos 1.0, full chain magspec 0.996; every exported bundle engine-gated
cos ≥ 0.9999.
License
Apache-2.0 (commercial OK), inherited from openbmb/VoxCPM2.
Not affiliated with OpenBMB or Apple. Community port.
More models in this format:Core AI Model Zoo — 75 models, each with the recipe that produced it.
Want a different model on-device?Open a request — free, open weights only; the export and its measured numbers get published publicly.