fix(desktop): Mac sidecar 부팅 + 단축키 녹화 모달 ⌘ 표기
문제 1: STT release 안 됨 → 진짜 원인은 sidecar import 실패 - 시스템 python3 (Python 3.13)에 numpy/faster-whisper 등 sidecar deps 없음 - 매번 spawn 직후 ModuleNotFoundError로 즉사 → /health 30s 타임아웃 - 사용자에게는 '핫키 release 안 됨'으로 보이지만, 실제로는 핫키는 정상, STT 응답이 없어 결과 팝업이 안 뜬 것 수정: - apps/desktop/sidecar/.venv/ 신규 (gitignored) - Python 3.13.13 venv - 최소 deps: faster-whisper 1.2.1, fastapi 0.135, uvicorn 0.44, python-multipart, numpy 2.4 - torch/pyannote는 lazy import이므로 화자 구분 쓸 때 추가 설치 - main/utils/paths.ts: getSidecarCommand가 venv python 우선 사용 - existsSync(.venv/bin/python3) → 그걸로 spawn - 없으면 시스템 python3 폴백 (기존 동작) - Windows는 .venv/Scripts/python.exe 문제 2: HotkeyRecordModal 칩에 'WIN' 그대로 표기 - getKeyName()이 KEY_DISPLAY_MAP (Windows 전용 매핑) 사용 - 91/92 → 'Win' 하드코딩 - format-hotkey.ts의 keyCodeToName/getPlatform export - HotkeyRecordModal.getKeyName이 keyCodeToName(platform) 호출 → macOS는 ⌘/⇧/⌃/⌥ - 'Shift + Win + 1 — 저장을 눌러주세요' 안내 텍스트도 macOS는 구분자 없이 결합
This commit is contained in:
parent
d2408c135f
commit
29c24a1520
3 changed files with 28 additions and 9 deletions
|
|
@ -54,7 +54,7 @@ export function getRecPath(): string {
|
|||
|
||||
/**
|
||||
* STT sidecar 실행 경로.
|
||||
* - dev: python/python3 + sidecar/main.py
|
||||
* - dev: sidecar/.venv/bin/python (있으면) + sidecar/main.py, 없으면 시스템 python3
|
||||
* - production: sidecar/sidecar(.exe) (PyInstaller 빌드)
|
||||
*/
|
||||
export function getSidecarCommand(): { command: string; args: string[] } {
|
||||
|
|
@ -71,8 +71,19 @@ export function getSidecarCommand(): { command: string; args: string[] } {
|
|||
return { command: pythonCmd, args: [pyPath] }
|
||||
}
|
||||
|
||||
// dev: Python 직접 실행
|
||||
const sidecarPath = path.join(app.getAppPath(), 'sidecar', 'main.py')
|
||||
// dev: venv 우선 → 없으면 시스템 python
|
||||
const sidecarDir = path.join(app.getAppPath(), 'sidecar')
|
||||
const sidecarPath = path.join(sidecarDir, 'main.py')
|
||||
|
||||
const venvPython =
|
||||
process.platform === 'win32'
|
||||
? path.join(sidecarDir, '.venv', 'Scripts', 'python.exe')
|
||||
: path.join(sidecarDir, '.venv', 'bin', 'python3')
|
||||
|
||||
if (existsSync(venvPython)) {
|
||||
return { command: venvPython, args: [sidecarPath] }
|
||||
}
|
||||
|
||||
const pythonCmd = process.platform === 'win32' ? 'python' : 'python3'
|
||||
return { command: pythonCmd, args: [sidecarPath] }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue