@drakulavich/kesha-voice-kit 1.22.0-beta.1 → 1.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +46 -418
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -13,49 +13,35 @@
13
13
 
14
14
  <p align="center"><b>Give your local tools and LLM agents a voice.</b><br>Fast speech-to-text, text-to-speech, voice-activity detection, and language detection in one local-first CLI: Apple Silicon CoreML first, ONNX fallback on supported Linux/Windows builds.</p>
15
15
 
16
- - **Transcribe locally** — 25 languages, up to ~19x faster than Whisper on Apple Silicon, ~2.5x on CPU
17
- - **Speak back** — Kokoro (EN), Vosk-TTS (RU), macOS system voices, and SSML preview
18
- - **Plug into agents** — ship voice workflows as CLI commands or an <a href="https://github.com/openclaw/openclaw">OpenClaw</a> skill; setup docs: [OpenClaw](docs/openclaw.md), [Hermes](docs/hermes.md)
16
+ - **Transcribe locally** — [25 languages](docs/languages.md#speech-to-text-25), up to ~19x faster than Whisper on Apple Silicon, ~2.5x on CPU
17
+ - **Speak back** — text-to-speech in [9 languages](docs/languages.md#text-to-speech)
18
+ - **Plug into agents** — ship voice workflows as CLI commands, an MCP server, an <a href="docs/openclaw.md">OpenClaw</a> skill, or a <a href="docs/hermes.md">Hermes</a> agent
19
19
  - **Small Rust engine** — single ~20MB binary, no ffmpeg, no Python, no native Node addons
20
20
 
21
- See [Product positioning](docs/product-positioning.md) for supported workflows, non-goals, maturity labels, and the platform matrix.
22
-
23
21
  <p align="center">
24
22
  <img src="https://github.com/drakulavich/kesha-voice-kit/raw/main/demo.gif" alt="kesha demo — English + Russian transcription with automatic language detection" width="800">
25
23
  </p>
26
24
 
27
25
  ## Quick Start
28
26
 
29
- Runtime: **[Bun](https://bun.sh)** >= 1.3.0.
30
-
31
- Install Bun (skip if already installed) — pick one:
27
+ Runtime: **[Bun](https://bun.sh)** >= 1.3.0 · Platforms: macOS arm64, Linux x64, Windows x64.
32
28
 
33
29
  ```bash
34
- # Linux & macOS
35
- curl -fsSL https://bun.sh/install | bash # upstream installer
36
- brew install oven-sh/bun/bun # Homebrew
37
- ```
38
-
39
- ```powershell
40
- # Windows
41
- powershell -c "irm bun.sh/install.ps1 | iex"
42
- ```
43
-
44
- Then install Kesha:
30
+ # 1. Install Bun (skip if you have it) — Linux & macOS:
31
+ curl -fsSL https://bun.sh/install | bash # or: brew install oven-sh/bun/bun
32
+ # Windows: powershell -c "irm bun.sh/install.ps1 | iex"
45
33
 
46
- ```bash
34
+ # 2. Install Kesha:
47
35
  bun add -g @drakulavich/kesha-voice-kit
48
- kesha install # downloads engine + models
49
- kesha audio.ogg # transcript to stdout
36
+ kesha install # downloads engine + models (explicit — never automatic)
37
+
38
+ # 3. Transcribe:
39
+ kesha audio.ogg # transcript to stdout
50
40
  ```
51
41
 
42
+ Prefer Homebrew, `.deb`/`.rpm`, Docker, or Nix? See [Other install methods](#other-install-methods).
52
43
  Air-gapped or behind a corporate mirror? See [docs/model-mirror.md](docs/model-mirror.md).
53
44
 
54
- ## Requirements
55
-
56
- - [Bun](https://bun.sh) >= 1.3
57
- - macOS arm64, Linux x64, or Windows x64
58
-
59
45
  ## Speech-to-text
60
46
 
61
47
  ```bash
@@ -64,12 +50,10 @@ kesha --format transcript audio.ogg # text + language/confidence
64
50
  kesha --format json audio.ogg # full JSON with lang fields
65
51
  kesha --json --timestamps audio.ogg # JSON with timestamped segments
66
52
  kesha --toon audio.ogg # compact LLM-friendly TOON
67
- kesha --verbose audio.ogg # show language detection details
68
- kesha --lang en audio.ogg # warn if detected language differs
69
53
  kesha status # show installed backend info
70
54
  ```
71
55
 
72
- Multiple files — headers per file, like `head`:
56
+ Multiple files get `head`-style headers; stdout is the transcript, stderr is errors — pipe-friendly:
73
57
 
74
58
  ```bash
75
59
  $ kesha freedom.ogg tahiti.ogg
@@ -80,429 +64,73 @@ $ kesha freedom.ogg tahiti.ogg
80
64
  Таити, Таити! Не были мы ни в какой Таити! Нас и тут неплохо кормят.
81
65
  ```
82
66
 
83
- Stdout: transcript. Stderr: errors. Pipe-friendly.
84
-
85
- For long / silence-heavy audio, install VAD (`kesha install --vad`) and run without `--no-vad`. Kesha auto-uses VAD past 120 s when installed; without VAD, very long audio falls back to fixed ASR chunks. Details: [docs/vad.md](docs/vad.md).
86
-
87
- **Speaker diarization** (darwin-arm64, post-v1.12.0):
88
-
89
- ```bash
90
- kesha install --diarize # one-time, ~245MB Sortformer model
91
- kesha --json --vad --speakers meeting.m4a > out.json
92
- jq '.[0].segments[] | "\(.speaker)\t\(.text)"' out.json
93
- ```
94
-
95
- Each segment gets a `speaker` integer (cluster ID, stable within one file). Linux / Windows: `--speakers` returns a clear "currently darwin-arm64 only" error — see [#199](https://github.com/drakulavich/kesha-voice-kit/issues/199).
67
+ - **Long / silence-heavy audio:** install VAD (`kesha install --vad`); Kesha auto-uses it past 120 s. Without VAD, long audio falls back to fixed ASR chunks. See [docs/vad.md](docs/vad.md).
68
+ - **Speaker diarization** (darwin-arm64): `kesha install --diarize`, then `kesha --json --vad --speakers meeting.m4a` stamps each segment with a `speaker` id. Linux/Windows return a clear "darwin-arm64 only" error ([#199](https://github.com/drakulavich/kesha-voice-kit/issues/199)).
96
69
 
97
70
  ## Text-to-speech
98
71
 
99
- Kesha speaks back via Kokoro-82M (English plus selected multilingual voices on Apple Silicon) and Vosk-TTS (Russian) — voice auto-picks from the text's language. On darwin-arm64, Kokoro uses FluidAudio CoreML instead of ONNX; FluidAudio stores that CoreML cache at `~/.cache/fluidaudio/Models/kokoro`, outside Kesha's pinned model cache:
72
+ Kesha speaks back in [9 languages](docs/languages.md#text-to-speech), auto-picking the voice from the text's language. Override with `--lang <code>` or `--voice <id>`.
100
73
 
101
74
  ```bash
102
- kesha install --tts # TTS, opt-in; Darwin Kokoro uses FluidAudio cache
75
+ kesha install --tts # opt-in models (~990MB)
103
76
  kesha say "Hello, world" > hello.wav
104
- kesha say "Привет, мир" > privet.wav # auto-routes (Milena on darwin, ru-vosk-m02 elsewhere)
105
- kesha say --voice es-em_alex "Hola, mundo" > hola.wav
106
- ```
107
-
108
- **Output formats** (`--format`, or inferred from `--out` extension):
109
-
110
- ```bash
111
- kesha say "Hello" --out hi.wav # WAV (default, uncompressed)
112
- kesha say "Hello" --format ogg-opus --out hi.ogg # OGG/Opus — messenger voice notes (Telegram/WhatsApp/Signal)
113
- kesha say "Hello" --format flac --out hi.flac # FLAC — lossless, royalty-free, plays in every browser incl. Safari/iOS
114
- ```
115
-
116
- FLAC is the format for web-embeddable samples: it plays natively in all modern browsers (including Safari/iOS, where OGG/Opus does not), stays royalty-free like Opus, and keeps the engine's native sample rate (no resample). `--bitrate` / `--sample-rate` apply only to `--format ogg-opus`.
117
-
118
- **Russian abbreviations** (`ru-vosk-*`): all-uppercase Cyrillic 2-5-char tokens auto-expand letter-by-letter when not pronounceable as a Russian syllable (ФСБ → "эф-эс-бэ", ВОЗ → "воз"). Disable with `--no-expand-abbrev`. See [docs/tts.md#russian-abbreviation-auto-expansion](docs/tts.md#russian-abbreviation-auto-expansion).
119
-
120
- **English acronyms** (`en-*`, Kokoro): three-table mechanism (letter-spell rule + STOP_LIST + IPA_LEXICON) auto-expands FBI → "ef bee eye" and gives EPAM/JSON/Anthropic the right IPA. Disable letter-spell with `--no-expand-abbrev`. See [docs/tts.md#english-acronym-auto-expansion](docs/tts.md#english-acronym-auto-expansion).
121
-
122
- **Russian word stress** (`ru-vosk-*` voices):
123
-
124
- ```bash
125
- # Caller provides `+` before the stressed vowel; engine passes it to Vosk
126
- kesha say --voice ru-vosk-m02 --ssml \
127
- '<speak><emphasis>дом+а</emphasis></speak>' # genitive до-МА́
128
-
129
- # Suppress an inherited <emphasis> with level="none"
130
- kesha say --voice ru-vosk-m02 --ssml \
131
- '<speak><emphasis level="none">дом+а</emphasis></speak>' # default ДО́ма
132
- ```
133
-
134
- Vosk-TTS 0.9-multi honors a `+` placed BEFORE the target stressed vowel — but only when the marker shifts stress AWAY from the model's default (first-syllable). `+` agreeing with the default is a no-op. See [#233](https://github.com/drakulavich/kesha-voice-kit/issues/233).
135
-
136
- **Speech rate via SSML** (`ru-vosk-*` and `en-*` voices):
137
-
138
- ```bash
139
- kesha say --voice ru-vosk-m02 --ssml \
140
- '<speak><prosody rate="slow">Привет, как дела.</prosody></speak>' --out slow.wav
141
-
142
- kesha say --voice en-am_michael --ssml \
143
- '<speak><prosody rate="x-fast">Read this fast.</prosody></speak>' --out fast.wav
144
- ```
145
-
146
- Honored when `<prosody rate>` wraps the whole utterance. Mid-utterance prosody warns and synthesizes at default rate (whole-segment-only is a v1 limitation; mid-utterance support tracked in [#236](https://github.com/drakulavich/kesha-voice-kit/issues/236)). `--rate` and `<prosody rate>` compose multiplicatively. Range clamped to 0.5×–2.0×.
147
-
148
- macOS system voices, SSML, voice listing, and the full voice catalogue: [docs/tts.md](docs/tts.md).
149
-
150
- ### Examples
151
-
152
- ```bash
153
- # Auto-detect language and pick a male default (en-am_michael / ru-vosk-m02)
154
- kesha say "Hello, world" --out hello.wav
155
- kesha say "Привет, мир" --out privet.wav
156
-
157
- # Choose a specific voice
158
- kesha say --voice en-am_michael "Voice in, text out." --out en.wav
159
- kesha say --voice ru-vosk-m02 "Голос в текст." --out ru.wav
160
-
161
- # List installed voices
162
- kesha say --list-voices
163
-
164
- # Output formats — inferred from the --out extension, or set with --format
165
- kesha say "Lossless, plays in Safari/iOS" --out demo.flac # FLAC (v1.20.0+)
166
- kesha say "Telegram-ready voice note" --format ogg-opus --out vn.ogg
167
- kesha say "Stream raw WAV to stdout" > out.wav # default: WAV
168
-
169
- # Speaking rate, 0.5×–2.0× (Vosk honors it on every platform)
170
- kesha say --voice ru-vosk-m02 --rate 0.75 "Помедленнее." --out slow.flac
171
- kesha say --voice ru-vosk-m02 --rate 1.5 "Побыстрее." --out fast.flac
172
-
173
- # macOS system voice — zero model download
174
- kesha say --voice macos-com.apple.voice.compact.ru-RU.Milena "Привет" --out milena.wav
175
- ```
176
-
177
- ## Homebrew Install
178
-
179
- Homebrew installs the Bun-based CLI wrapper. Engine and model downloads remain
180
- explicit:
181
-
182
- ```bash
183
- brew tap oven-sh/bun
184
- brew install drakulavich/tap/kesha-voice-kit
185
- kesha install
186
- kesha audio.ogg
187
- ```
188
-
189
- See [Homebrew install](docs/homebrew.md) for package scope and maintainer
190
- validation.
191
-
192
- ## Linux Packages
193
-
194
- Stable engine releases also publish `.deb` and `.rpm` packages for Linux x64.
195
- They install the standalone CLI wrapper; engine and model downloads remain explicit:
196
-
197
- ```bash
198
- kesha install
199
- kesha audio.ogg
200
- ```
201
-
202
- See [Linux packages](docs/linux-packages.md) for install commands and package
203
- scope.
204
-
205
- ## Docker
206
-
207
- Linux x64 CLI image, published to GHCR:
208
-
209
- ```bash
210
- docker run --rm \
211
- -v kesha-cache:/cache/kesha \
212
- -v "$PWD:/work" -w /work \
213
- ghcr.io/drakulavich/kesha-voice-kit:latest install
214
-
215
- docker run --rm \
216
- -v kesha-cache:/cache/kesha \
217
- -v "$PWD:/work" -w /work \
218
- ghcr.io/drakulavich/kesha-voice-kit:latest audio.ogg
77
+ kesha say "Привет, мир" > privet.wav # auto-routes by language
78
+ kesha say --voice ru-vosk-m02 "Голос в текст." > ru.wav
219
79
  ```
220
80
 
221
- The image keeps model downloads and the engine cache under `/cache/kesha`.
222
- Mount that path as a named volume so `kesha install`, TTS models, VAD, and future
223
- runs reuse the same cache. `compose.yml` provides the same layout:
81
+ **Output formats** (`--format`, or inferred from the `--out` extension):
224
82
 
225
83
  ```bash
226
- docker compose run --rm kesha install
227
- docker compose run --rm kesha audio.ogg
84
+ kesha say "Hello" --out hi.wav # WAV (default, uncompressed)
85
+ kesha say "Hello" --format ogg-opus --out hi.ogg # OGG/Opus — messenger voice notes
86
+ kesha say "Hello" --format flac --out hi.flac # FLAC — lossless, plays in every browser incl. Safari/iOS
228
87
  ```
229
88
 
230
- ## Nix Install
89
+ `kesha say --list-voices` lists what's installed. Voices, the full catalogue, macOS system voices, SSML, speaking rate (`--rate`, `<prosody>`), Russian word stress, and Russian/English abbreviation handling are all in **[docs/tts.md](docs/tts.md)**.
231
90
 
232
- Alternative reproducible-build path on `aarch64-darwin` / `x86_64-linux`:
233
-
234
- ```bash
235
- nix run github:drakulavich/kesha-voice-kit -- install # downloads models (engine is bundled)
236
- nix run github:drakulavich/kesha-voice-kit -- audio.ogg # transcribe
237
- ```
238
-
239
- Full recipes (one-liner, profile install, engine-only, dev shell) live in [docs/nix-install.md](docs/nix-install.md).
240
-
241
- ## Shell Completions and Manpage
242
-
243
- The npm package includes bash, zsh, and fish completions plus `kesha(1)`.
244
- The CLI can print the packaged files, so install paths do not depend on the
245
- Bun global package layout:
91
+ ## Languages
246
92
 
247
- ```bash
248
- # bash
249
- mkdir -p ~/.local/share/bash-completion/completions
250
- kesha completions bash > ~/.local/share/bash-completion/completions/kesha
251
-
252
- # zsh
253
- mkdir -p ~/.zsh/completions
254
- kesha completions zsh > ~/.zsh/completions/_kesha
255
- # add to ~/.zshrc once: fpath=(~/.zsh/completions $fpath); autoload -Uz compinit; compinit
256
-
257
- # fish
258
- mkdir -p ~/.config/fish/completions
259
- kesha completions fish > ~/.config/fish/completions/kesha.fish
260
-
261
- # manpage
262
- mkdir -p ~/.local/share/man/man1
263
- kesha manpage > ~/.local/share/man/man1/kesha.1
264
- mandb ~/.local/share/man 2>/dev/null || true
265
- ```
93
+ **Speech-to-text** spans 25 languages and **text-to-speech** covers English, Russian, and select multilingual voices — full tables with codes and flags in **[docs/languages.md](docs/languages.md)**. Audio language detection identifies [107 languages](https://huggingface.co/speechbrain/lang-id-voxlingua107-ecapa).
266
94
 
267
95
  ## Performance
268
96
 
269
97
  > **Up to ~19x faster than Whisper** on Apple Silicon (M2), **~2.5x faster** on CPU
270
98
 
271
- Compared against Whisper `large-v3-turbo` — all engines auto-detect language.
99
+ Compared against Whisper `large-v3-turbo`, all engines auto-detecting language:
272
100
 
273
101
  ![Benchmark: openai-whisper vs faster-whisper vs Kesha Voice Kit](https://github.com/drakulavich/kesha-voice-kit/raw/main/docs/assets/benchmark.svg)
274
102
 
275
- See [BENCHMARK.md](BENCHMARK.md) for the full per-file breakdown (Russian + English).
276
-
277
- ## Architecture
278
-
279
- ```text
280
- Users / agents
281
- shell | scripts | OpenClaw | Hermes | Raycast | @drakulavich/kesha-voice-kit/core
282
- |
283
- v
284
- +------------------------------- Kesha CLI -------------------------------+
285
- | Bun + TypeScript wrapper |
286
- | - parses commands and formats stdout/stderr |
287
- | - installs pinned engine/model assets only when explicitly requested |
288
- | - keeps cache, support bundles, and local Stats in the CLI |
289
- +-----------------------------------+-------------------------------------+
290
- |
291
- | spawns one local process
292
- v
293
- +----------------------------- kesha-engine ------------------------------+
294
- | Rust binary, no cloud calls, no Python, no ffmpeg |
295
- | |
296
- | Audio input Text input Diagnostics |
297
- | WAV/MP3/OGG/FLAC/AAC/M4A plain text / SSML status/support |
298
- | | | | |
299
- | v v v |
300
- | Symphonia decode TTS preprocessing runtime probes |
301
- | | | |
302
- | +--> optional VAD +--> voice routing |
303
- | | + diarization | Kokoro / Vosk / macOS voices |
304
- | | | |
305
- | +--> audio lang ID +--> speech synthesis |
306
- | | SpeechBrain ONNX |
307
- | | |
308
- | +--> ASR backend |
309
- | CoreML on Apple Silicon |
310
- | ONNX Runtime on Linux/Windows/fallback |
311
- +-----------------------------------+-------------------------------------+
312
- |
313
- v
314
- transcript | JSON/TOON | WAV | local diagnostics
315
- ```
316
-
317
- Cache boundary: `kesha install` and opt-in feature installs populate the local
318
- cache; ordinary transcription and speech commands fail fast if required assets
319
- are missing.
320
-
321
- Contributors: see [`docs/architecture.md`](docs/architecture.md) for the
322
- code-level map (repo layout, CLI↔engine boundary, backends, model pinning,
323
- tests, and a "where to change X" table).
103
+ Full per-file breakdown (Russian + English): [BENCHMARK.md](BENCHMARK.md).
324
104
 
325
- ## What's Inside
105
+ ## Other install methods
326
106
 
327
- | Model | Task | Size | Source |
328
- |---|---|---|---|
329
- | NVIDIA Parakeet TDT 0.6B v3 | Speech-to-text | ~2.5GB | [HuggingFace](https://huggingface.co/nvidia/parakeet-tdt-0.6b-v3) |
330
- | SpeechBrain ECAPA-TDNN | Audio language detection | ~86MB | [HuggingFace](https://huggingface.co/speechbrain/lang-id-voxlingua107-ecapa) |
331
- | Apple NLLanguageRecognizer | Text language detection | built-in | macOS system framework |
332
- | Silero VAD v5 (opt-in) | Voice activity detection | ~2.3MB | [snakers4/silero-vad](https://github.com/snakers4/silero-vad) |
333
- | Kokoro-82M / Vosk-TTS (opt-in) | Text-to-speech | ~990MB | [FluidAudio Kokoro](https://github.com/FluidInference/FluidAudio) on darwin-arm64 (FluidAudio cache, not Kesha-verified); ONNX Kokoro elsewhere · [Vosk-TTS](https://github.com/alphacep/vosk-tts) |
334
-
335
- All models run through `kesha-engine` — a Rust binary using [FluidAudio](https://github.com/FluidInference/FluidAudio) (CoreML) on Apple Silicon and [ort](https://github.com/pykeio/ort) (ONNX Runtime) on other platforms.
336
-
337
- Audio decoding via [symphonia](https://github.com/pdeljanov/Symphonia) — WAV, MP3, OGG/Opus, FLAC, AAC, M4A. No ffmpeg.
338
-
339
- ## Languages
107
+ All of these install the Bun CLI wrapper; engine + models still download explicitly via `kesha install`.
340
108
 
341
- - **Speech-to-text (25):** Bulgarian, Croatian, Czech, Danish, Dutch, English, Estonian, Finnish, French, German, Greek, Hungarian, Italian, Latvian, Lithuanian, Maltese, Polish, Portuguese, Romanian, Russian, Slovak, Slovenian, Spanish, Swedish, Ukrainian.
342
- - **Audio language detection (107):** [full list](https://huggingface.co/speechbrain/lang-id-voxlingua107-ecapa).
109
+ - **Homebrew** — `brew install drakulavich/tap/kesha-voice-kit` · [docs/homebrew.md](docs/homebrew.md)
110
+ - **Linux packages** (`.deb`/`.rpm`, x64) — [docs/linux-packages.md](docs/linux-packages.md)
111
+ - **Docker** (GHCR image) — [docs/docker.md](docs/docker.md)
112
+ - **Nix** (`aarch64-darwin` / `x86_64-linux`) — `nix run github:drakulavich/kesha-voice-kit -- install` · [docs/nix-install.md](docs/nix-install.md)
113
+ - **Shell completions + manpage** — `kesha completions bash|zsh|fish` and `kesha manpage` print the packaged files to install wherever your shell expects them.
343
114
 
344
115
  ## Integrations
345
116
 
117
+ - **MCP server** — `kesha mcp` exposes transcribe/synthesize/list tools to any MCP client (Claude, Cursor, Codex, Gemini). Setup: [docs/mcp.md](docs/mcp.md).
346
118
  - **OpenClaw** — give your LLM agent ears. Install & config: [docs/openclaw.md](docs/openclaw.md).
347
119
  - **Hermes Agent** — local STT/TTS through Hermes command providers. Setup: [docs/hermes.md](docs/hermes.md).
348
- - **Raycast** (macOS) — transcribe selected audio & speak clipboard from the launcher. Source + install: [`raycast/`](raycast/).
349
-
350
- ## MCP server
351
-
352
- `kesha mcp` runs a local Model Context Protocol server over stdio, exposing
353
- `transcribe_audio`, `synthesize_speech`, `list_voices`, and `list_languages` to
354
- any MCP client. Models are never auto-downloaded — tools fail with a
355
- `kesha install` / `kesha install --tts` hint when missing.
356
-
357
- Add to your client config:
358
-
359
- ```json
360
- { "mcpServers": { "kesha": { "command": "kesha", "args": ["mcp"] } } }
361
- ```
362
-
363
- Claude Desktop users can place the same JSON in `claude_desktop_config.json`.
364
-
365
- <details>
366
- <summary>Claude Code</summary>
367
-
368
- ```bash
369
- claude mcp add kesha -- kesha mcp
370
- ```
371
-
372
- </details>
373
-
374
- <details>
375
- <summary>Codex</summary>
376
-
377
- Add to `~/.codex/config.toml`:
378
-
379
- ```toml
380
- [mcp_servers.kesha]
381
- command = "kesha"
382
- args = ["mcp"]
383
- ```
120
+ - **Raycast** (macOS) — transcribe selected audio & speak the clipboard from the launcher. Source + install: [`raycast/`](raycast/).
121
+ - **Programmatic API** — `@drakulavich/kesha-voice-kit/core` for use inside a Bun program. See [docs/api.md](docs/api.md).
384
122
 
385
- </details>
123
+ ## More
386
124
 
387
- <details>
388
- <summary>Gemini CLI</summary>
389
-
390
- Add to `~/.gemini/settings.json`:
391
-
392
- ```json
393
- {
394
- "mcpServers": {
395
- "kesha": {
396
- "command": "kesha",
397
- "args": ["mcp"]
398
- }
399
- }
400
- }
401
- ```
402
-
403
- </details>
404
-
405
- <details>
406
- <summary>Cursor</summary>
407
-
408
- Add to `.cursor/mcp.json`:
409
-
410
- ```json
411
- {
412
- "mcpServers": {
413
- "kesha": {
414
- "command": "kesha",
415
- "args": ["mcp"]
416
- }
417
- }
418
- }
419
- ```
420
-
421
- </details>
422
-
423
- If a tool returns "models not installed", run `kesha install` (ASR) or
424
- `kesha install --tts` (TTS) once, then retry.
425
-
426
- ## Programmatic API
427
-
428
- ```typescript
429
- import { transcribe, downloadModel } from "@drakulavich/kesha-voice-kit/core";
430
-
431
- await downloadModel(); // install engine + models
432
- const text = await transcribe("audio.ogg"); // transcribe
433
- ```
434
-
435
- ## Support diagnostics
436
-
437
- Kesha can collect local diagnostics without downloading models or mutating cache state:
438
-
439
- ```bash
440
- kesha doctor --json --redact
441
- kesha support-bundle --output kesha-support.tar.gz
442
- kesha support-bundle --include-logs --output kesha-support-with-logs.tar.gz
443
- kesha logs status
444
- kesha logs status --json
445
- ```
446
-
447
- `support-bundle` creates a redacted `.tar.gz` archive for GitHub issues. It includes runtime, engine, cache, optional-component, Stats status, and known Kesha environment settings. It does not include audio, transcripts, model files, or the Stats database.
448
- Diagnostic log contents are excluded by default; pass `--include-logs` to add a
449
- bounded tail of Kesha's privacy-safe NDJSON diagnostic log.
450
-
451
- `kesha logs` manages local, rotated diagnostic logs for troubleshooting. Logs
452
- default to `retain-on-failure` and also support explicit `off` and `on` modes.
453
- Use `kesha logs status --json` for a stable machine-readable status contract
454
- covering the active path, mode, size, rotation settings, and rotated-file list.
455
- They use content-free NDJSON events: command/stage names, versions, durations,
456
- exit codes, and coarse audio metadata only. They must not store audio,
457
- transcripts, input text, generated speech text, file names, full paths, raw
458
- stdout/stderr, environment variables, tokens, or URLs. See [Diagnostic logs](docs/diagnostic-logs.md).
459
-
460
- Every user-facing failure prints a stable `error [CODE]: …` line on stderr. See
461
- [Error codes](docs/errors.md) for the full reference; engine codes are also
462
- available via `kesha-engine --error-codes-json`.
463
-
464
- ## Local Stats privacy and lifecycle
465
-
466
- Kesha Stats is disabled by default. When you opt in with `kesha stats enable`,
467
- Kesha writes a local SQLite database only on your machine:
468
-
469
- ```bash
470
- kesha stats status
471
- kesha stats week
472
- kesha stats errors
473
- kesha stats export --format json # or csv
474
- kesha stats retention 30 # default: 90 days
475
- kesha stats retention off # keep until reset
476
- kesha stats reset # delete recorded stats rows
477
- kesha stats vacuum # compact the SQLite file
478
- ```
479
-
480
- The database stores content-free operational records only: command name
481
- (`transcribe` or `say`), timestamps, success/failure status, app version, item
482
- count, anonymous stage timings, input/output artifact kind, file extension,
483
- size, optional duration/sample-rate/channel counts, and sanitized error
484
- class/code/message.
485
-
486
- Stats never stores audio bytes, transcripts, input text, generated speech text,
487
- file names, full file paths, raw stdout/stderr, environment variables, model
488
- files, API tokens, or cloud identifiers. `support-bundle` reports Stats status
489
- only; it never includes the Stats SQLite database.
490
-
491
- By default, Stats prunes rows older than 90 days before writing or exporting
492
- data. Use `kesha stats retention <days>` to change the TTL or `kesha stats
493
- retention off` to disable TTL pruning. `kesha stats reset` deletes recorded
494
- runs, artifacts, timings, and errors while preserving settings such as enabled
495
- state and retention.
125
+ - [Architecture](docs/architecture.md) — runtime data flow, the models that ship, the CLI ↔ Rust engine boundary, model pinning, and where tests live.
126
+ - [Use cases](docs/use-cases.md) — copy-paste recipes (transcribe a meeting, speak from OpenClaw, run offline, move the cache).
127
+ - [Product positioning](docs/product-positioning.md) — supported workflows, non-goals, maturity labels, platform matrix.
128
+ - **Diagnostics:** `kesha doctor`, `kesha support-bundle` (redacted `.tar.gz` for issues), and `kesha logs` produce local, content-free diagnostics — see [docs/diagnostic-logs.md](docs/diagnostic-logs.md). Every failure prints a stable `error [CODE]: …` line ([docs/errors.md](docs/errors.md)).
129
+ - **Privacy / Local Stats:** Stats are **off by default** and fully local. Opt in with `kesha stats enable` to record content-free operational metrics in a local SQLite database — never networked, never storing audio, transcripts, text, or paths. Full commands & lifecycle: [docs/local-stats.md](docs/local-stats.md).
496
130
 
497
131
  ## Contributing
498
132
 
499
- See [CONTRIBUTING.md](CONTRIBUTING.md). Project docs:
500
-
501
- - [Architecture](docs/architecture.md) — TS CLI ↔ Rust engine ↔ ASR/TTS backends, model cache, where tests live
502
- - [Use cases](docs/use-cases.md) — copy-paste recipes (transcribe a meeting, speak from OpenClaw, run offline, move the cache)
503
- - [Roadmap](ROADMAP.md) — Now / Next / Later
504
- - [Decision log](docs/decision-log.md) — why the platform/model choices were made (and reversed)
505
- - Dev setup: `make dev-setup` (Bun, Rust, nextest, platform libs)
133
+ See [CONTRIBUTING.md](CONTRIBUTING.md), the [Roadmap](ROADMAP.md) (Now / Next / Later), and the [Decision log](docs/decision-log.md) (why platform/model choices were made — and reversed). Dev setup: `make dev-setup` (Bun, Rust, nextest, platform libs).
506
134
 
507
135
  ## License
508
136
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@drakulavich/kesha-voice-kit",
3
- "version": "1.22.0-beta.1",
4
- "description": "Give your local tools a voice: fast STT in 25 languages (~19x faster than Whisper on Apple Silicon, ONNX CPU fallback), TTS via Kokoro/Vosk/macOS voices, VAD + 107-language detection. Rust engine, Bun CLI, OpenClaw skill.",
3
+ "version": "1.22.0",
4
+ "description": "Give your tools a voice — speech to text and back, 25 languages, up to ~19× faster than Whisper. On your machine.",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "kesha": "bin/kesha.js"
@@ -32,7 +32,7 @@
32
32
  ]
33
33
  },
34
34
  "keshaEngine": {
35
- "version": "1.22.0-beta.1"
35
+ "version": "1.22.0"
36
36
  },
37
37
  "scripts": {
38
38
  "test": "bun test",