@hxnnxs/opencode-voice 0.2.2 → 0.2.4
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/CHANGELOG.md +13 -0
- package/PUBLISHING.md +2 -2
- package/README.md +17 -9
- package/bin/opencode-voice.js +17 -4
- package/docs/README.es.md +3 -3
- package/docs/README.ru.md +10 -6
- package/docs/README.zh.md +3 -3
- package/index.js +231 -174
- package/lib/engine.js +161 -82
- package/lib/engines.js +14 -8
- package/lib/handy-model-catalog.js +79 -1
- package/lib/wav.js +91 -0
- package/package.json +10 -4
- package/tui.js +108 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.4 - 2026-12-02
|
|
4
|
+
|
|
5
|
+
- Support OpenCode 2 TUI plugins while retaining the V1 entrypoint (#7).
|
|
6
|
+
- Honor explicit Windows microphone selection, wait for DirectShow audio, stop FFmpeg gracefully and repair unfinished WAV sizes (#5).
|
|
7
|
+
- Keep full recorder diagnostics in per-recording logs and error dialogs (#2).
|
|
8
|
+
- Add GigaAM v4 Q8_0, Parakeet Ultra, Parakeet Primeline, Orukeet and both Granite Speech 5 TurboCTC variants; update the native sidecar to a pinned 0.5.2 Zapformer port.
|
|
9
|
+
|
|
10
|
+
## 0.2.3 - 2026-08-17
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Repaired unfinalized WAV headers before transcription so recordings interrupted by forced recorder termination remain usable.
|
|
15
|
+
|
|
3
16
|
## 0.2.2 - 2026-08-16
|
|
4
17
|
|
|
5
18
|
### Fixed
|
package/PUBLISHING.md
CHANGED
|
@@ -15,10 +15,10 @@ Before publishing:
|
|
|
15
15
|
5. Run the **Engine Release** GitHub Actions workflow first. It builds both `whisper-cli` and the Rust `opencode-voice-transcribe` sidecar for every platform, then publishes:
|
|
16
16
|
|
|
17
17
|
```txt
|
|
18
|
-
https://github.com/ihxnnxs/opencode-voice/releases/download/
|
|
18
|
+
https://github.com/ihxnnxs/opencode-voice/releases/download/engines-2026-12/registry.json
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
6. Confirm the registry contains assets for the target release platforms.
|
|
21
|
+
6. Confirm the registry contains assets for the target release platforms and the transcribe-cpp sidecar reports `Supports GigaAM-v4` in its help output. Do not publish the npm update before this registry exists.
|
|
22
22
|
7. Run:
|
|
23
23
|
|
|
24
24
|
```bash
|
package/README.md
CHANGED
|
@@ -28,13 +28,15 @@
|
|
|
28
28
|
|
|
29
29
|
## Install
|
|
30
30
|
|
|
31
|
-
One command through OpenCode:
|
|
31
|
+
One command through OpenCode 2:
|
|
32
32
|
|
|
33
33
|
```bash
|
|
34
|
-
opencode plugin @hxnnxs/opencode-voice
|
|
34
|
+
opencode plugin add @hxnnxs/opencode-voice
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
For OpenCode 1.17.4–1.x, use `opencode plugin @hxnnxs/opencode-voice`. OpenCode 2 also supports adding the package to the `plugins` array in global `cli.json`. If migrating an older installation, move its plugin entry from `opencode.json(c)` or `tui.json` to `cli.json`.
|
|
38
|
+
|
|
39
|
+
On first launch, choose a model. The plugin downloads its required local runtime and model weights automatically. Audio and transcription stay on your machine.
|
|
38
40
|
|
|
39
41
|
Optional CLI installer. It runs the same OpenCode plugin install command and pre-downloads the managed engine:
|
|
40
42
|
|
|
@@ -100,7 +102,7 @@ Settings also let you select a microphone, language, model, download location, a
|
|
|
100
102
|
|
|
101
103
|
## Models
|
|
102
104
|
|
|
103
|
-
The picker includes 19 `whisper.cpp` GGML choices and
|
|
105
|
+
The picker includes 19 `whisper.cpp` GGML choices and 74 ASR GGUF models, including Handy's catalog and GigaAM v4. Pick one model at a time; only that model is downloaded.
|
|
104
106
|
|
|
105
107
|
Useful `whisper.cpp` starting points:
|
|
106
108
|
|
|
@@ -120,11 +122,13 @@ The managed `transcribe-cpp` sidecar provides these Handy catalog families. Diar
|
|
|
120
122
|
|
|
121
123
|
| Model | Size | Notes |
|
|
122
124
|
| --- | --- | --- |
|
|
123
|
-
| Parakeet, Nemotron, GigaAM | varies |
|
|
125
|
+
| Parakeet, Nemotron, GigaAM | varies | Includes Parakeet Ultra, Primeline, Orukeet and GigaAM v4 (Russian and English, 244 MiB) |
|
|
124
126
|
| Moonshine | varies | English plus language-specific variants |
|
|
125
127
|
| Canary, Cohere, SenseVoice, Fun-ASR | varies | multilingual and specialized recognizers |
|
|
126
128
|
| Whisper, Breeze, Voxtral, Qwen, Granite | varies | general-purpose and language-specialized models |
|
|
127
129
|
|
|
130
|
+
GigaAM v4 and the new Handy models require the updated native runtime. GigaAM v4 uses the experimental Zapformer port from [transcribe.cpp PR #285](https://github.com/handy-computer/transcribe.cpp/pull/285); builds must use the pinned revision in `sidecar/Cargo.toml`. The same runtime adds Granite Speech 5 TurboCTC and TurboCTC-NC.
|
|
131
|
+
|
|
128
132
|
Model downloads support resume, retry, progress, and SHA256 verification. Sidecar catalog URLs are pinned to an upstream Hugging Face revision and their LFS SHA-256 digest, so a model cannot be activated until its expected artifact verifies.
|
|
129
133
|
|
|
130
134
|
> [!NOTE]
|
|
@@ -139,7 +143,8 @@ npx @hxnnxs/opencode-voice doctor
|
|
|
139
143
|
```
|
|
140
144
|
|
|
141
145
|
- `Engine not found in registry: transcribe-cpp`: the installed plugin expects a release registry that does not yet include the sidecar. Update the plugin after its matching Engine Release is published, or locally import a built sidecar with `opencode-voice engine import transcribe-cpp <path>`.
|
|
142
|
-
- `Could not start recorder` on Windows:
|
|
146
|
+
- `Could not start recorder` on Windows: select the actual microphone in `/voice-settings`; explicit devices never fall back to another microphone. Startup waits up to five seconds per device. Automatic selection tries enumerated DirectShow devices, not the unsupported `audio=default` alias.
|
|
147
|
+
- Recorder diagnostics: each attempt writes the exact executable, arguments, stderr, startup timing and exit status to a `.log` file alongside recordings. Find its path in the error dialog, `/voice-settings` → Audio and system → Diagnostics, or `opencode-voice doctor` (default cache).
|
|
143
148
|
- Hold-to-talk is unavailable: current OpenCode releases do not expose terminal key-release events to TUI plugins. Use the default `ctrl+r` toggle mode instead.
|
|
144
149
|
|
|
145
150
|
## Platform Status
|
|
@@ -155,13 +160,14 @@ npx @hxnnxs/opencode-voice doctor
|
|
|
155
160
|
The package follows the public OpenCode TUI plugin shape used by community plugins.
|
|
156
161
|
|
|
157
162
|
- npm package exports `./tui`
|
|
158
|
-
-
|
|
159
|
-
- published install uses `opencode plugin @hxnnxs/opencode-voice`
|
|
163
|
+
- OpenCode 2 uses `cli.json`; OpenCode 1 uses `tui.json`
|
|
164
|
+
- published install uses `opencode plugin add @hxnnxs/opencode-voice` on V2
|
|
160
165
|
- runtime settings live in OpenCode TUI plugin storage
|
|
161
166
|
|
|
162
167
|
Files:
|
|
163
168
|
|
|
164
|
-
- `index.js` - TUI
|
|
169
|
+
- `index.js` - shared TUI commands, dialogs and V1 entrypoint
|
|
170
|
+
- `tui.js` - V2 TUI entrypoint and API adapter
|
|
165
171
|
- `lib/models.js` - model registry, cache paths, default settings
|
|
166
172
|
- `lib/download.js` - resumable model download and SHA256 verification
|
|
167
173
|
- `lib/engine.js` - recorder selection, managed Windows recorder install, and runtime-routed transcription
|
|
@@ -195,9 +201,11 @@ Use the current checkout in OpenCode:
|
|
|
195
201
|
```bash
|
|
196
202
|
git clone https://github.com/ihxnnxs/opencode-voice.git opencode-voice
|
|
197
203
|
cd opencode-voice
|
|
204
|
+
# OpenCode 1 only:
|
|
198
205
|
opencode plugin "$(pwd)"
|
|
199
206
|
```
|
|
200
207
|
|
|
208
|
+
For OpenCode 2, add the checkout's absolute directory to `plugins` in global `cli.json`.
|
|
201
209
|
## Project Status
|
|
202
210
|
|
|
203
211
|
This is an independent OpenCode plugin. It is not built by the OpenCode team and is not affiliated with OpenCode.
|
package/bin/opencode-voice.js
CHANGED
|
@@ -23,7 +23,8 @@ Usage:
|
|
|
23
23
|
opencode-voice engine remove <whisper.cpp|transcribe-cpp>
|
|
24
24
|
|
|
25
25
|
Development install from this checkout:
|
|
26
|
-
|
|
26
|
+
OpenCode 2: add the checkout directory to cli.json's plugins array
|
|
27
|
+
OpenCode 1: opencode plugin <path-to-this-checkout>
|
|
27
28
|
`);
|
|
28
29
|
}
|
|
29
30
|
|
|
@@ -105,11 +106,16 @@ async function doctor() {
|
|
|
105
106
|
const ffmpeg = recorderInstall?.resolvedBinary || resolveCommand("ffmpeg", recorderOptions);
|
|
106
107
|
const arecord = resolveCommand("arecord", recorderOptions);
|
|
107
108
|
const sox = resolveCommand("sox", recorderOptions);
|
|
109
|
+
const recordingsDir = getAudioDir();
|
|
110
|
+
const lastLog = fs.existsSync(recordingsDir)
|
|
111
|
+
? fs.readdirSync(recordingsDir).filter((name) => /^voice-.*\.log$/.test(name)).sort().at(-1)
|
|
112
|
+
: undefined;
|
|
108
113
|
const payload = {
|
|
109
114
|
platform: `${process.platform}-${process.arch}`,
|
|
110
115
|
cacheDir: getCacheDir(),
|
|
111
116
|
modelsDir: getModelsDir(),
|
|
112
|
-
recordingsDir
|
|
117
|
+
recordingsDir,
|
|
118
|
+
recorderLog: lastLog ? path.join(recordingsDir, lastLog) : null,
|
|
113
119
|
engine,
|
|
114
120
|
probe,
|
|
115
121
|
sidecar,
|
|
@@ -142,6 +148,7 @@ async function doctor() {
|
|
|
142
148
|
`Cache dir: ${payload.cacheDir}`,
|
|
143
149
|
`Models dir: ${payload.modelsDir}`,
|
|
144
150
|
`Recordings dir: ${payload.recordingsDir}`,
|
|
151
|
+
`Last recorder log: ${payload.recorderLog || "none"}`,
|
|
145
152
|
`Engine source: ${engine.source}`,
|
|
146
153
|
`Managed engine dir: ${engine.managedDir}`,
|
|
147
154
|
`whisper-cli: ${engine.resolvedBinary || "missing"}`,
|
|
@@ -254,7 +261,7 @@ async function installCommand() {
|
|
|
254
261
|
const pluginArgs = args.filter((arg) => arg !== "--no-engine");
|
|
255
262
|
const spawnOptions = { stdio: "inherit" };
|
|
256
263
|
if (process.platform === "win32") spawnOptions.shell = true;
|
|
257
|
-
const result = spawnSync("opencode", ["plugin", packageName(), ...pluginArgs], spawnOptions);
|
|
264
|
+
const result = spawnSync("opencode", isV2(spawnOptions) ? ["plugin", "add", packageName()] : ["plugin", packageName(), ...pluginArgs], spawnOptions);
|
|
258
265
|
if (result.error) {
|
|
259
266
|
console.error(`Failed to run opencode: ${result.error.message}`);
|
|
260
267
|
process.exit(1);
|
|
@@ -280,7 +287,7 @@ function updateCommand() {
|
|
|
280
287
|
const pluginArgs = args.filter((arg) => arg === "--global");
|
|
281
288
|
const spawnOptions = { stdio: "inherit" };
|
|
282
289
|
if (process.platform === "win32") spawnOptions.shell = true;
|
|
283
|
-
const result = spawnSync("opencode", ["plugin", packageName(), "--force", ...pluginArgs], spawnOptions);
|
|
290
|
+
const result = spawnSync("opencode", isV2(spawnOptions) ? ["plugin", "update", packageName()] : ["plugin", packageName(), "--force", ...pluginArgs], spawnOptions);
|
|
284
291
|
if (result.error) {
|
|
285
292
|
console.error(`Failed to run opencode: ${result.error.message}`);
|
|
286
293
|
process.exit(1);
|
|
@@ -288,6 +295,12 @@ function updateCommand() {
|
|
|
288
295
|
if ((result.status ?? 1) !== 0) process.exit(result.status ?? 1);
|
|
289
296
|
}
|
|
290
297
|
|
|
298
|
+
function isV2(spawnOptions) {
|
|
299
|
+
const result = spawnSync("opencode", ["--version"], { ...spawnOptions, stdio: ["ignore", "pipe", "ignore"], encoding: "utf8" });
|
|
300
|
+
const match = result.stdout?.match(/\bv?(\d+)\.\d+\.\d+/);
|
|
301
|
+
return Number(match?.[1]) >= 2;
|
|
302
|
+
}
|
|
303
|
+
|
|
291
304
|
if (command === "install") await installCommand();
|
|
292
305
|
else if (command === "update") updateCommand();
|
|
293
306
|
else if (command === "doctor") await doctor();
|
package/docs/README.es.md
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
Una sola orden mediante OpenCode:
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
|
-
opencode plugin @hxnnxs/opencode-voice
|
|
32
|
+
opencode plugin add @hxnnxs/opencode-voice
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
Reinicia OpenCode después de instalar. En el primer inicio, el plugin descarga el managed `whisper.cpp` engine y el modelo elegido. El usuario no instala `whisper-cli` manualmente.
|
|
@@ -117,8 +117,8 @@ Modelos sidecar planeados:
|
|
|
117
117
|
El paquete sigue la forma pública de plugin TUI que usan los plugins de la comunidad de OpenCode.
|
|
118
118
|
|
|
119
119
|
- npm package exporta `./tui`
|
|
120
|
-
- el desarrollo local puede
|
|
121
|
-
- la instalación
|
|
120
|
+
- el desarrollo local puede usar una ruta absoluta en `cli.json` (V2) o `tui.json` (V1)
|
|
121
|
+
- la instalación usa `opencode plugin add @hxnnxs/opencode-voice` (V2) o `opencode plugin @hxnnxs/opencode-voice` (V1)
|
|
122
122
|
- runtime settings viven en OpenCode TUI plugin storage
|
|
123
123
|
|
|
124
124
|
Archivos:
|
package/docs/README.ru.md
CHANGED
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
|
|
27
27
|
### Установка
|
|
28
28
|
|
|
29
|
-
Одна команда через OpenCode:
|
|
29
|
+
Одна команда через OpenCode 2:
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
|
-
opencode plugin @hxnnxs/opencode-voice
|
|
32
|
+
opencode plugin add @hxnnxs/opencode-voice
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
Для OpenCode 1 используйте `opencode plugin @hxnnxs/opencode-voice`. При переходе на V2 перенесите запись плагина в массив `plugins` файла `cli.json`. При первом запуске плагин сам скачает движок и модель.
|
|
36
36
|
|
|
37
37
|
Опциональный CLI-установщик. Он запускает ту же установку через OpenCode и заранее скачивает managed engine:
|
|
38
38
|
|
|
@@ -101,7 +101,8 @@ Hold-to-talk отключен по умолчанию, потому что termi
|
|
|
101
101
|
Запланированные sidecar-модели:
|
|
102
102
|
|
|
103
103
|
- Parakeet V3
|
|
104
|
-
- GigaAM v3
|
|
104
|
+
- GigaAM v3 и GigaAM v4 (русский и английский, Q8_0)
|
|
105
|
+
- Parakeet Ultra, Primeline, Orukeet, Granite Speech 5 TurboCTC и TurboCTC-NC
|
|
105
106
|
- Moonshine V2 Small
|
|
106
107
|
|
|
107
108
|
### Статус платформ
|
|
@@ -117,8 +118,8 @@ Hold-to-talk отключен по умолчанию, потому что termi
|
|
|
117
118
|
Пакет повторяет публичную форму OpenCode TUI-плагинов, которую используют community-плагины.
|
|
118
119
|
|
|
119
120
|
- npm package экспортирует `./tui`
|
|
120
|
-
- локальная
|
|
121
|
-
-
|
|
121
|
+
- локальная разработка: абсолютный путь в `cli.json` (V2) или `tui.json` (V1)
|
|
122
|
+
- установка V2: `opencode plugin add @hxnnxs/opencode-voice`
|
|
122
123
|
- runtime settings хранятся в OpenCode TUI plugin storage
|
|
123
124
|
|
|
124
125
|
Файлы:
|
|
@@ -156,9 +157,12 @@ npm pack --dry-run
|
|
|
156
157
|
```bash
|
|
157
158
|
git clone https://github.com/ihxnnxs/opencode-voice.git opencode-voice
|
|
158
159
|
cd opencode-voice
|
|
160
|
+
# Только OpenCode 1:
|
|
159
161
|
opencode plugin "$(pwd)"
|
|
160
162
|
```
|
|
161
163
|
|
|
164
|
+
Для OpenCode 2 добавьте абсолютный путь репозитория в `plugins` файла `cli.json`.
|
|
165
|
+
|
|
162
166
|
### Статус проекта
|
|
163
167
|
|
|
164
168
|
Это независимый OpenCode plugin. Его не разрабатывает команда OpenCode, и он не связан с OpenCode официально.
|
package/docs/README.zh.md
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
通过 OpenCode 一条命令安装:
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
|
-
opencode plugin @hxnnxs/opencode-voice
|
|
32
|
+
opencode plugin add @hxnnxs/opencode-voice
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
安装后重启 OpenCode。首次启动会自动下载 managed `whisper.cpp` engine 和你选择的模型。用户不需要手动安装 `whisper-cli`。
|
|
@@ -117,8 +117,8 @@ ctrl+r -> 停止、转写并插入文本
|
|
|
117
117
|
该包采用 OpenCode community TUI 插件使用的公共结构。
|
|
118
118
|
|
|
119
119
|
- npm package 导出 `./tui`
|
|
120
|
-
- 本地开发可以在 `tui.json` 中使用绝对路径
|
|
121
|
-
-
|
|
120
|
+
- 本地开发可以在 `cli.json` (V2) 或 `tui.json` (V1) 中使用绝对路径
|
|
121
|
+
- V2 使用 `opencode plugin add @hxnnxs/opencode-voice`,V1 使用 `opencode plugin @hxnnxs/opencode-voice`
|
|
122
122
|
- runtime settings 存储在 OpenCode TUI plugin storage 中
|
|
123
123
|
|
|
124
124
|
文件:
|