mlboydaisuke commited on
Commit
34f389e
Β·
verified Β·
1 Parent(s): f73ec1e

gen-cards: regenerate Use-it block for CoreAIKit 0.8.0; name 0.8.0 as the release from which generation stops at the end of the KV cache

Browse files
Files changed (1) hide show
  1. README.md +7 -7
README.md CHANGED
@@ -36,7 +36,7 @@ bundles + a few host-side projections.
36
  <!-- gen-cards:use-it begin id=voxcpm2-2b (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.3](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.3/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):
@@ -45,13 +45,13 @@ bundles + a few host-side projections.
45
  let audio = try await CoreAI.speak(text, options: .model("voxcpm2-2b"))
46
  ```
47
 
48
- Every op, one shape β€” [Cookbook](https://github.com/john-rocky/coreai-kit/blob/0.7.3/docs/COOKBOOK.md).
49
 
50
- ▢️ **Run it (source)** β€” the [Speak runner](https://github.com/john-rocky/coreai-kit/tree/0.7.3/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.3 --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 "VoxCPM2 2B" in the model picker
@@ -73,7 +73,7 @@ let audio = try await speaker.synthesize(text)
73
  // audio.samples: 48 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.3/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
  Live playback? `synthesizeStreaming(_:onChunk:)` hands you ~0.5 s chunks as they decode,
@@ -82,7 +82,7 @@ so audio starts before the whole clip exists. The WAV container is your app's te
82
 
83
  **Integration checklist**
84
 
85
- - SPM: `https://github.com/john-rocky/coreai-kit` (exact **0.7.3**) β†’ product **CoreAIKit**
86
  - Info.plist: none needed
87
  - Entitlements: none needed
88
  - First run downloads the model β€” ~4,721 MB (Mac) / ~4,727 MB (iPhone) β€” then it loads from the
@@ -143,7 +143,7 @@ let tts = try await VoxCPM2TTS(paths: .standard(artifactsRoot: root, lm: .int8))
143
  let wav = try await tts.synthesize("On device speech synthesis, running entirely on your iPhone.") // 48 kHz Float PCM
144
  ```
145
 
146
- A clip's text and speech share the base and residual decode graphs' fixed KV cache of 512 positions: one position per text token and one per speech frame. A clip is at most 300 frames (48 s) by default (`maxFrames`), so a text of up to 211 tokens (about 800 characters of English) always fits, and a longer one can run out of room. From the CoreAIKit release after 0.7.3, the clip then ends where the cache ends, before the end of the text, and a text that leaves no room for speech throws `VoxCPMError.textTooLong` (VoxCPM2 shares VoxCPM's errors). CoreAIKit 0.7.3 and earlier do not stop at the end of the cache, and in a Mac test the kit raised no error and kept producing audio past it, which has not been listened to.
147
 
148
  `KitSpeaker` and `CoreAI.speak` pass the whole text at once: split a long text into sentences and synthesize them one by one.
149
 
 
36
  <!-- gen-cards:use-it begin id=voxcpm2-2b (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.8.0](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.8.0/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):
 
45
  let audio = try await CoreAI.speak(text, options: .model("voxcpm2-2b"))
46
  ```
47
 
48
+ Every op, one shape β€” [Cookbook](https://github.com/john-rocky/coreai-kit/blob/0.8.0/docs/COOKBOOK.md).
49
 
50
+ ▢️ **Run it (source)** β€” the [Speak runner](https://github.com/john-rocky/coreai-kit/tree/0.8.0/Examples/Speak)
51
  (GUI + CLI, one app for every text-to-speech model in the catalog):
52
 
53
  ```bash
54
+ git clone --branch 0.8.0 --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 "VoxCPM2 2B" in the model picker
 
73
  // audio.samples: 48 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.8.0/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
  Live playback? `synthesizeStreaming(_:onChunk:)` hands you ~0.5 s chunks as they decode,
 
82
 
83
  **Integration checklist**
84
 
85
+ - SPM: `https://github.com/john-rocky/coreai-kit` (exact **0.8.0**) β†’ product **CoreAIKit**
86
  - Info.plist: none needed
87
  - Entitlements: none needed
88
  - First run downloads the model β€” ~4,721 MB (Mac) / ~4,727 MB (iPhone) β€” then it loads from the
 
143
  let wav = try await tts.synthesize("On device speech synthesis, running entirely on your iPhone.") // 48 kHz Float PCM
144
  ```
145
 
146
+ A clip's text and speech share the base and residual decode graphs' fixed KV cache of 512 positions: one position per text token and one per speech frame. A clip is at most 300 frames (48 s) by default (`maxFrames`), so a text of up to 211 tokens (about 800 characters of English) always fits, and a longer one can run out of room. From CoreAIKit 0.8.0, the clip then ends where the cache ends, before the end of the text, and a text that leaves no room for speech throws `VoxCPMError.textTooLong` (VoxCPM2 shares VoxCPM's errors). CoreAIKit 0.7.3 and earlier do not stop at the end of the cache, and in a Mac test the kit raised no error and kept producing audio past it, which has not been listened to.
147
 
148
  `KitSpeaker` and `CoreAI.speak` pass the whole text at once: split a long text into sentences and synthesize them one by one.
149