Auto-update could not work at all: the installer was 189 MB because it carried
the local speech engine and ffmpeg, and the download feed rejects uploads over
about 100 MiB, so update metadata could never be published.
The installer now leaves those components out and the app fetches them the first
time they are needed, verifying every part and the joined archive before
installing. The installer is 90.6 MiB, the update feed is published again, and
updates stay small because the engine is not re-sent on every release.
The fetch is visible and recoverable: the download runs with progress, a failed
install cleans up after itself, and Settings > STT shows the runtime status with
a manual download action for when the automatic one cannot run.
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.
- press가 STT 초기화를 await하며 action queue 점유 → release 수십 초 지연·
유령 세션 반복 버그 수정 (initSTT fire-and-forget)
- 프리플라이트: STT 모델 미설치 시 즉시 에러 + 메인 UI 경고 + 온보딩 오픈
- 사이드카: 기동 중 프로세스 사망 시 30초 대기 없이 즉시 실패,
restartCount 리셋, error 리스너 부재 미처리 예외 방지
- 실시간 부분 전사: 1.5s 간격 interim → RecordingTip에 말하는 내용 미리보기
- Ollama 미가용 후처리 스킵 시 warning 배너, voice:error 브로드캐스트 신설
- verifying/manifest 상태(바이트 진행률 없음)에서 인디터미넌트 바 + 친화적 문구
— 9.6GB 검증 ~2분간 멈춘 것처럼 보이던 문제 해소
- OnboardingModal 중복 실행 가드 (runningRef)
- LocalLLMService.pullModel: 동일 모델 동시 pull은 기존 promise 합류
- LocalSTTService.downloadModel: /download 409는 실패가 아닌 기존 진행 합류
증상:
- 'Transcription failed: Sidecar 프로세스가 실행 중이 아닙니다' 에러
- 로그: [Errno 48] address already in use ('127.0.0.1', 18765)
- 새로 spawn한 sidecar가 즉시 exit code 1로 종료
- 그러나 health check은 성공 — 이전 인스턴스의 orphan sidecar가 응답
- _sidecarProcess 핸들이 새 (실패한) ChildProcess라서 transcribe 시
null check가 통과 못 하고 STTSidecarNotRunning 에러
원인:
- dev mode HMR/재시작 시 main process는 죽지만 spawn한 python 자식 프로세스가
orphan으로 살아남는 경우가 있음 (특히 SIGKILL이 자식까지 전파 안 될 때)
- 다음 main process가 SIDECAR_PORT(18765)에 다시 바인드하려다 충돌
수정:
- LocalSTTService._spawnSidecar 진입 시 _findFreePort(SIDECAR_PORT, 20) 호출
- net.createServer로 127.0.0.1:port listen 시도해 비어있는 첫 포트 탐색
- 18765부터 18784까지 순차 시도
- 모두 점유 시 STTSidecarSpawnFailed 에러
- this._port를 동적 할당 결과로 갱신 → spawn args + health/load/transcribe URL이
자동으로 새 포트 사용
영향:
- orphan sidecar가 18765를 점유하고 있어도 새 sidecar가 18766/18767에서 정상 부팅
- 이전 orphan은 시간이 지나거나 사용자가 직접 kill하거나 app quit 시 정리 가능
- 클린 환경에서는 항상 18765로 복귀
- npm workspaces 루트 (apps/*, packages/*) 세팅
- V1 전체를 apps/desktop/으로 git mv (src, resources, tests, sidecar,
scripts, electron.vite.config.ts, electron-builder.yml, vitest.config.ts,
tsconfig.node.json, tsconfig.web.json)
- apps/desktop/package.json 신규 (name=@d3ro/desktop)
- productName: 'd3ro-voice' 명시 — app.getName()을 고정하여 userData 경로
%APPDATA%\d3ro-voice\ 그대로 유지 (기존 DB/설정 연속성 보장)
- 루트 package.json을 workspace 루트로 재구성, 공통 devDep만 유지
(typescript, eslint, prettier)
- turbo.json, tsconfig.base.json 추가 (Turborepo 자체 설치는 별도 sub-phase)
- memory/project_status.md 생성 (규칙 13)
검증:
- npm run typecheck 통과
- npm run build 통과 (electron-vite main+preload+renderer)
- npm run dev 실제 실행 → DB/핫키/Ollama 자동 실행 모두 정상
2026-04-08 14:04:41 +09:00
Renamed from src/main/services/LocalSTTService.ts (Browse further)