feat(desktop): make local speech transcription work end to end

Local dictation had never produced a transcript on an installed build. The
engine itself was healthy; every connection to it was broken.

Installed builds shipped no speech engine at all: the packaging config had no
entry for the faster-whisper sidecar and no pipeline step built one, so the app
always fell back to a system Python without the runtime. Development was broken
too, because the sidecar and SoX paths were resolved against the Vite output
directory instead of the app root, which also meant recording failed with a SoX
ENOENT. On hosts where localhost resolves only to IPv6, every local request was
refused outright, which silently disabled both local transcription and the local
LLM.

The sidecar is now built and bundled (including the Silero VAD data it needs),
gated by a packaging check that fails when the engine or its data is missing.
Paths are discovered from the app root and fail loudly when the engine is
absent. Local engine URLs are normalized to the IPv4 loopback, decoding is tuned
so repeated hallucinations cannot compound (the same transcript now takes about
a fifth of the time), the engine is warmed up at startup, and holding the hotkey
now shows the text forming live in the recording tip.
This commit is contained in:
Yun Chan 2026-09-18 00:48:47 +09:00
parent 359b244dc9
commit 2d585bfc29
52 changed files with 1450 additions and 3861 deletions

View file

@ -243,6 +243,11 @@ package-windows:
$env:CSC_LINK = (Resolve-Path -LiteralPath $env:WIN_CSC_PFX_FILE).Path
$env:CSC_KEY_PASSWORD = $env:WIN_CSC_KEY_PASSWORD
- node scripts/ci/sync-version.mjs --check --tag "$CI_COMMIT_TAG"
# 로컬 STT는 faster-whisper 사이드카에 의존한다. 이 번들이 빠지면 설치본에서
# 전사가 전혀 동작하지 않으므로, 패키징 전에 반드시 빌드하고 검증한다.
- npm run sidecar:setup --workspace=@d3ro/desktop
- npm run sidecar:build --workspace=@d3ro/desktop
- node scripts/ci/verify-sidecar-bundle.mjs
- npm run build --workspace=@d3ro/desktop
- cd apps/desktop
- npx electron-builder --win --x64 --config electron-builder.yml
@ -270,6 +275,10 @@ package-macos:
- npm ci
script:
- node scripts/ci/sync-version.mjs --check --tag "$CI_COMMIT_TAG"
# 로컬 STT(faster-whisper 사이드카) 번들 — 누락 시 설치본 전사 불가.
- npm run sidecar:setup --workspace=@d3ro/desktop
- npm run sidecar:build --workspace=@d3ro/desktop
- node scripts/ci/verify-sidecar-bundle.mjs
- npm run build --workspace=@d3ro/desktop
- cd apps/desktop
- npx electron-builder --mac --arm64 --config electron-builder.yml