gen-cards: regenerate Use-it block
Browse files
README.md
CHANGED
|
@@ -25,6 +25,48 @@ Gated **77/77 token-exact** end-to-end vs the HF `ParakeetForTDT` reference, and
|
|
| 25 |
through the Swift **CoreAIKit** `KitParakeetModel`. blank 8192 · durations [0,1,2,3,4] · 16 kHz.
|
| 26 |
|
| 27 |
<!-- gen-cards:use-it begin id=parakeet-tdt-0.6b-v3 (managed by scripts/gen-cards — edit cards.json / QuickStart.swift, not this block) -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
<!-- gen-cards:use-it end -->
|
| 29 |
|
| 30 |
## Use (CoreAIKit)
|
|
|
|
| 25 |
through the Swift **CoreAIKit** `KitParakeetModel`. blank 8192 · durations [0,1,2,3,4] · 16 kHz.
|
| 26 |
|
| 27 |
<!-- gen-cards:use-it begin id=parakeet-tdt-0.6b-v3 (managed by scripts/gen-cards — edit cards.json / QuickStart.swift, not this block) -->
|
| 28 |
+

|
| 29 |
+
*Parakeet-TDT 0.6B on iPhone 17 Pro — the zoo's coreai-audio app, real speed.*
|
| 30 |
+
|
| 31 |
+
## Use it
|
| 32 |
+
|
| 33 |
+
▶️ **Run it (source)** — the [Transcribe runner](https://github.com/john-rocky/coreai-kit/tree/main/Examples/Transcribe)
|
| 34 |
+
(GUI + CLI, one app for every speech-to-text model in the catalog):
|
| 35 |
+
|
| 36 |
+
```bash
|
| 37 |
+
git clone https://github.com/john-rocky/coreai-kit
|
| 38 |
+
open coreai-kit/Examples/Transcribe/Transcribe.xcodeproj
|
| 39 |
+
# → Run, then pick "Parakeet-TDT 0.6B v3" in the model picker
|
| 40 |
+
|
| 41 |
+
# agents / headless (macOS):
|
| 42 |
+
cd coreai-kit/Examples/Transcribe
|
| 43 |
+
swift run transcribe-cli --model parakeet-tdt-0.6b-v3 --audio sample.wav
|
| 44 |
+
```
|
| 45 |
+
|
| 46 |
+
💻 **Build with it** — complete; the glue is kit API, copy-paste runs:
|
| 47 |
+
|
| 48 |
+
```swift
|
| 49 |
+
import CoreAIKit
|
| 50 |
+
|
| 51 |
+
let transcriber = try await KitTranscriber(catalog: "parakeet-tdt-0.6b-v3")
|
| 52 |
+
let samples = try AudioFile.pcm16kMono(url) // any wav/m4a/mp3 → 16 kHz mono Float
|
| 53 |
+
let result = try await transcriber.transcribe(samples: samples)
|
| 54 |
+
// result.text (25 EU languages)
|
| 55 |
+
```
|
| 56 |
+
|
| 57 |
+
The take-home is [`Examples/Transcribe/Sources/QuickStart.swift`](https://github.com/john-rocky/coreai-kit/blob/main/Examples/Transcribe/Sources/QuickStart.swift)
|
| 58 |
+
— this exact code as one typed function, no UI; both the runner's GUI and its CLI call it.
|
| 59 |
+
Recording? `MicRecorder` (kit API) captures mic audio as 16 kHz mono `[Float]` — the record
|
| 60 |
+
button and permission prompt are your app's own chrome.
|
| 61 |
+
|
| 62 |
+
**Integration checklist**
|
| 63 |
+
|
| 64 |
+
- SPM: `https://github.com/john-rocky/coreai-kit` → product **CoreAIKit**
|
| 65 |
+
- Info.plist: `NSMicrophoneUsageDescription` — only if you record
|
| 66 |
+
- Entitlements: none needed (macOS)
|
| 67 |
+
- First run downloads the model — 1.3 GB (Mac) — then it loads from the
|
| 68 |
+
local cache (Application Support; progress via the `downloadProgress` callback)
|
| 69 |
+
- Measure in Release — Debug is ~3× slower on per-token host work
|
| 70 |
<!-- gen-cards:use-it end -->
|
| 71 |
|
| 72 |
## Use (CoreAIKit)
|