gen-cards: regenerate Use-it block
Browse files
README.md
CHANGED
|
@@ -36,6 +36,8 @@ Runs fully on-device, English-first, with grapheme→phoneme on the host.
|
|
| 36 |
<!-- gen-cards:use-it begin id=kokoro-82m (managed by scripts/gen-cards — edit cards.json / QuickStart.swift, not this block) -->
|
| 37 |
## Use it
|
| 38 |
|
|
|
|
|
|
|
| 39 |
⚡ **One line** — run the kit's task op on this model
|
| 40 |
(`import CoreAIOps`; no session, no model plumbing, downloads on first use):
|
| 41 |
|
|
@@ -43,21 +45,24 @@ Runs fully on-device, English-first, with grapheme→phoneme on the host.
|
|
| 43 |
let audio = try await CoreAI.speak(text, options: .model("kokoro-82m"))
|
| 44 |
```
|
| 45 |
|
| 46 |
-
Every op, one shape — [Cookbook](https://github.com/john-rocky/coreai-kit/blob/
|
| 47 |
|
| 48 |
-
▶️ **Run it (source)** — the [Speak runner](https://github.com/john-rocky/coreai-kit/tree/
|
| 49 |
(GUI + CLI, one app for every text-to-speech model in the catalog):
|
| 50 |
|
| 51 |
```bash
|
| 52 |
-
git clone https://github.com/john-rocky/coreai-kit
|
| 53 |
-
|
|
|
|
| 54 |
# → Run, then pick "Kokoro 82M" in the model picker
|
| 55 |
|
| 56 |
# agents / headless (macOS):
|
| 57 |
cd coreai-kit/Examples/Speak
|
| 58 |
-
swift run speak-cli --model kokoro-82m --text "Hello from Core AI." --output hello.wav
|
| 59 |
```
|
| 60 |
|
|
|
|
|
|
|
| 61 |
💻 **Build with it** — complete; the glue is kit API, copy-paste runs:
|
| 62 |
|
| 63 |
```swift
|
|
@@ -68,7 +73,7 @@ let audio = try await speaker.synthesize(text)
|
|
| 68 |
// audio.samples: 24 kHz mono PCM in [-1, 1] — play it or write a WAV
|
| 69 |
```
|
| 70 |
|
| 71 |
-
The take-home is [`Examples/Speak/Sources/QuickStart.swift`](https://github.com/john-rocky/coreai-kit/blob/
|
| 72 |
— this exact code as one typed function, no UI; the CLI is an argument shell over it, and
|
| 73 |
the GUI drives the same `KitSpeaker(catalog:)` and plays the samples.
|
| 74 |
English-first: G2P is a dictionary over the bundled misaki lexicons (~180k words);
|
|
@@ -78,10 +83,10 @@ label. Streaming? `synthesizeStreaming(_:onChunk:)` hands you a chunk per senten
|
|
| 78 |
|
| 79 |
**Integration checklist**
|
| 80 |
|
| 81 |
-
- SPM: `https://github.com/john-rocky/coreai-kit` → product **CoreAIKit**
|
| 82 |
- Info.plist: none needed
|
| 83 |
- Entitlements: none needed
|
| 84 |
-
- First run downloads the model —
|
| 85 |
local cache (Application Support; progress via the `downloadProgress` callback)
|
| 86 |
- Measure in Release — Debug is ~3× slower on per-token host work
|
| 87 |
<!-- gen-cards:use-it end -->
|
|
|
|
| 36 |
<!-- gen-cards:use-it begin id=kokoro-82m (managed by scripts/gen-cards — edit cards.json / QuickStart.swift, not this block) -->
|
| 37 |
## Use it
|
| 38 |
|
| 39 |
+
**New to Core AI? [Start with CoreAIKit 0.7.1](https://github.com/john-rocky/coreai-kit#readme).** Follow its requirements and first-run steps for `qwen3-0.6b`, then open the same release's [ChatDemo](https://github.com/john-rocky/coreai-kit/tree/0.7.1/Examples/ChatDemo). The README records the tested OS/SDK and download size; model and device coverage is stated per example.
|
| 40 |
+
|
| 41 |
⚡ **One line** — run the kit's task op on this model
|
| 42 |
(`import CoreAIOps`; no session, no model plumbing, downloads on first use):
|
| 43 |
|
|
|
|
| 45 |
let audio = try await CoreAI.speak(text, options: .model("kokoro-82m"))
|
| 46 |
```
|
| 47 |
|
| 48 |
+
Every op, one shape — [Cookbook](https://github.com/john-rocky/coreai-kit/blob/0.7.1/docs/COOKBOOK.md).
|
| 49 |
|
| 50 |
+
▶️ **Run it (source)** — the [Speak runner](https://github.com/john-rocky/coreai-kit/tree/0.7.1/Examples/Speak)
|
| 51 |
(GUI + CLI, one app for every text-to-speech model in the catalog):
|
| 52 |
|
| 53 |
```bash
|
| 54 |
+
git clone --branch 0.7.1 --depth 1 https://github.com/john-rocky/coreai-kit
|
| 55 |
+
export DEVELOPER_DIR=/Applications/Xcode-27.0.0-RC.app/Contents/Developer
|
| 56 |
+
open -a /Applications/Xcode-27.0.0-RC.app coreai-kit/Examples/Speak/Speak.xcodeproj
|
| 57 |
# → Run, then pick "Kokoro 82M" in the model picker
|
| 58 |
|
| 59 |
# agents / headless (macOS):
|
| 60 |
cd coreai-kit/Examples/Speak
|
| 61 |
+
swift run -c release speak-cli --model kokoro-82m --text "Hello from Core AI." --output hello.wav
|
| 62 |
```
|
| 63 |
|
| 64 |
+
Use Xcode build **27A266a** from the release's `.xcode-pin`; adjust the app path if your installation is named differently.
|
| 65 |
+
|
| 66 |
💻 **Build with it** — complete; the glue is kit API, copy-paste runs:
|
| 67 |
|
| 68 |
```swift
|
|
|
|
| 73 |
// audio.samples: 24 kHz mono PCM in [-1, 1] — play it or write a WAV
|
| 74 |
```
|
| 75 |
|
| 76 |
+
The take-home is [`Examples/Speak/Sources/QuickStart.swift`](https://github.com/john-rocky/coreai-kit/blob/0.7.1/Examples/Speak/Sources/QuickStart.swift)
|
| 77 |
— this exact code as one typed function, no UI; the CLI is an argument shell over it, and
|
| 78 |
the GUI drives the same `KitSpeaker(catalog:)` and plays the samples.
|
| 79 |
English-first: G2P is a dictionary over the bundled misaki lexicons (~180k words);
|
|
|
|
| 83 |
|
| 84 |
**Integration checklist**
|
| 85 |
|
| 86 |
+
- SPM: `https://github.com/john-rocky/coreai-kit` (exact **0.7.1**) → product **CoreAIKit**
|
| 87 |
- Info.plist: none needed
|
| 88 |
- Entitlements: none needed
|
| 89 |
+
- First run downloads the model — ~341 MB (Mac) — then it loads from the
|
| 90 |
local cache (Application Support; progress via the `downloadProgress` callback)
|
| 91 |
- Measure in Release — Debug is ~3× slower on per-token host work
|
| 92 |
<!-- gen-cards:use-it end -->
|