@drakulavich/kesha-voice-kit 1.0.0 → 1.0.2

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.
package/README.md CHANGED
@@ -11,9 +11,9 @@
11
11
  <a href="https://bun.sh"><img src="https://img.shields.io/badge/runtime-Bun-f9f1e1?logo=bun" alt="Bun"></a>
12
12
  </p>
13
13
 
14
- <p align="center"><b>Open-source voice toolkit for Apple Silicon.</b><br>A collection of small, fast, open-source audio models — packaged as CLI tools and an <a href="https://github.com/openclaw/openclaw">OpenClaw</a> skill for LLM agents.</p>
14
+ <p align="center"><b>Open-source voice toolkit.</b> Optimized for Apple Silicon (CoreML), works on any platform (ONNX fallback).<br>A collection of small, fast, open-source audio models — packaged as CLI tools and an <a href="https://github.com/openclaw/openclaw">OpenClaw</a> skill for LLM agents.</p>
15
15
 
16
- - **Speech-to-text** — 25 languages, ~19x faster than Whisper on Apple Silicon
16
+ - **Speech-to-text** — 25 languages, ~19x faster than Whisper on Apple Silicon, ~2.5x on CPU
17
17
  - **Language detection** — 107 languages from audio, text language via NLLanguageRecognizer
18
18
  - **Rust engine** — single 20MB binary, no ffmpeg, no Python, no native Node addons
19
19
  - **OpenClaw-ready** — plug into your LLM agent as a voice processing skill
@@ -28,18 +28,16 @@ kesha audio.ogg # transcript to stdout
28
28
 
29
29
  ## OpenClaw Integration
30
30
 
31
- Kesha Voice Kit is built as a skill for [OpenClaw](https://github.com/openclaw/openclaw) — give your LLM agent ears. No API keys, everything runs locally on your machine.
31
+ Kesha Voice Kit ships as a plugin for [OpenClaw](https://github.com/openclaw/openclaw) — give your LLM agent ears. No API keys, everything runs locally on your machine.
32
32
 
33
- Add to your OpenClaw config:
33
+ **Install the plugin** (requires the `kesha` CLI — see [Quick Start](#quick-start)):
34
34
 
35
- ```json
36
- {
37
- "type": "cli",
38
- "command": "kesha",
39
- "args": ["--json", "{{MediaPath}}"]
40
- }
35
+ ```bash
36
+ openclaw plugins install @drakulavich/kesha-voice-kit
41
37
  ```
42
38
 
39
+ OpenClaw fetches the package from npm, auto-detects [`openclaw.plugin.json`](./openclaw.plugin.json), and wires `kesha --json {{MediaPath}}` as the audio transcription backend under `tools.media.audio`. Manage it afterwards with `openclaw plugins list`, `openclaw plugins disable kesha-voice-kit`, or `openclaw plugins uninstall kesha-voice-kit`.
40
+
43
41
  Your agent receives a voice message in Telegram/WhatsApp/Slack. Kesha transcribes it locally, detects the language, and returns structured JSON:
44
42
 
45
43
  ```json
@@ -2,6 +2,7 @@
2
2
  "name": "kesha-voice-kit",
3
3
  "displayName": "Kesha Voice Kit",
4
4
  "description": "Local speech-to-text for voice messages. 25 languages, ~19x faster than Whisper on Apple Silicon. Drop-in replacement for openai-whisper.",
5
+ "configSchema": {},
5
6
  "configPatch": {
6
7
  "tools": {
7
8
  "media": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drakulavich/kesha-voice-kit",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Open-source voice toolkit for Apple Silicon. Speech-to-text, language detection. 25 languages.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  import { dirname } from "path";
2
2
  import { existsSync, mkdirSync, chmodSync } from "fs";
3
- import { getEngineBinPath } from "./engine";
3
+ import { getEngineBinPath, getEngineCapabilities } from "./engine";
4
4
  import { log } from "./log";
5
5
  import { streamResponseToFile } from "./progress";
6
6
 
@@ -50,8 +50,17 @@ export async function downloadEngine(noCache = false, backend?: string): Promise
50
50
  log.success("Engine binary downloaded.");
51
51
  }
52
52
 
53
+ if (backend) {
54
+ const caps = await getEngineCapabilities();
55
+ if (caps && caps.backend !== backend) {
56
+ throw new Error(
57
+ `Requested backend "${backend}" is not available: the installed engine for this platform uses "${caps.backend}".\n Fix: omit --${backend} to use the auto-detected backend, or run on a platform that ships the "${backend}" build.`,
58
+ );
59
+ }
60
+ }
61
+
53
62
  log.progress("Installing models...");
54
- const installArgs = ["install", ...(noCache ? ["--no-cache"] : []), ...(backend ? [`--backend=${backend}`] : [])];
63
+ const installArgs = ["install", ...(noCache ? ["--no-cache"] : [])];
55
64
  const proc = Bun.spawnSync([binPath, ...installArgs], {
56
65
  stdout: "pipe",
57
66
  stderr: "pipe",