VoiceModeService ↔ 팝업 연동 구현 (Speakly RE 패턴)
- startSession: RecordingTip 표시 (recording 상태) - 오디오 레벨: sendAudioLevelToTip → 웨이브 바 애니메이션 - stopSession: RecordingTip → thinking 상태 전환 - completeSession: RecordingTip 숨김 + 삽입 실패 시 ResultPopup 표시 - cancelSession: RecordingTip 즉시 숨김 - handleError: RecordingTip에 에러 표시 → 3초 후 자동 숨김 → idle 복귀 - CLAUDE.md: 핵심 병목 + Speakly 파이프라인 패턴 문서화
This commit is contained in:
parent
9d5594e848
commit
18d5fef594
2 changed files with 73 additions and 2 deletions
41
CLAUDE.md
41
CLAUDE.md
|
|
@ -78,10 +78,47 @@ npm run typecheck # tsc --noEmit
|
|||
|
||||
## 현재 상태
|
||||
Phase: 8 진행 중 (Phase 1~7.5 + 3.5 완료, Phase 8 UI+기능 보강 진행)
|
||||
마지막 작업: Phase 8 — SSOT 리팩토링 + HotkeyRecordModal + Dashboard 재작성
|
||||
다음 작업: **녹음→전사 파이프라인 E2E 테스트** (핫키 변경 후 실제 사이클 확인)
|
||||
마지막 작업: SoX `-t waveaudio` 수정 → 마이크 캡처 동작 확인, VAD 에러 방어
|
||||
다음 작업: **VoiceModeService ↔ 팝업 연동** (RE 패턴 기반 — 핵심 병목)
|
||||
차단 이슈: @nut-tree-fork/nut-js 포크 사용
|
||||
|
||||
### ⚠️ 핵심 병목: VoiceModeService ↔ 팝업 연동 미구현
|
||||
Speakly RE 재조사로 발견된 치명적 갭:
|
||||
1. **VoiceModeService가 RecordingTip/ResultPopup과 전혀 연동 안 됨**
|
||||
- 녹음 시작 시 팝업 표시 안 함, 에러 시 팝업 숨김 안 함
|
||||
- Speakly: VoiceModeService가 이벤트 발행 → main/index.js에서 RecordingTipWindow 메서드 호출
|
||||
2. **RecordingTipUIState 상태 머신 없음**
|
||||
- Speakly: OPENING→RECORDING→THINKING→COMPLETED/ERROR/CANCELLED
|
||||
- D3RO: 상태 없이 수동 show/hide만
|
||||
3. **session-aware 윈도우 관리 없음**
|
||||
- Speakly: showForSession(sessionId) / hideForSession(sessionId) — race condition 방지
|
||||
4. **에러 후 복구 안 됨**
|
||||
- 에러 시 RecordingTip이 "실패" 상태로 남아있고, 핫키가 안 먹힘
|
||||
- Speakly: 에러 표시 → 3초 후 자동 숨김 → idle 복귀
|
||||
|
||||
### Speakly 음성 파이프라인 패턴 (RE 결과)
|
||||
```
|
||||
[핫키 press] → Action Queue에 enqueue → processActionQueue()
|
||||
→ startRecording():
|
||||
1. 시스템 오디오 뮤트 (500ms 후)
|
||||
2. emit('recording-tip:show-opening') → RecordingTip 표시
|
||||
3. MicNativeService.start() → 오디오 스트리밍
|
||||
4. emit('recording-tip:mic-ready') → 웨이브 바 활성
|
||||
5. RecognitionSession 생성 → STT 연결
|
||||
→ 녹음 중: 오디오 레벨 → sendAudioLevel() → 웨이브 바
|
||||
|
||||
[핫키 release] → stopAndProcess():
|
||||
1. MicNativeService.stop()
|
||||
2. accidentalPress 체크 (< 700ms → 취소)
|
||||
3. 언뮤트 + 종료 효과음
|
||||
4. RecordingTip → thinking 상태
|
||||
5. session.commitAndWait() → 전사 결과 대기
|
||||
6. 전사 완료 → 텍스트 삽입 시도
|
||||
7. 삽입 성공 → RecordingTip 숨김
|
||||
8. 삽입 실패 → ResultPopup 표시
|
||||
9. 에러 → RecordingTip에 에러 표시 → 3초 후 숨김
|
||||
```
|
||||
|
||||
### DS 컴포넌트 현황 (src/renderer/components/ds/)
|
||||
- CrtDisplay.tsx: WebGL CRT 셰이더 (파형+스캔라인+비네팅+글리치) ✅
|
||||
- InstrumentPanel.tsx: 메탈 섀시 컨테이너 (각인 텍스트, 노이즈) ✅
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue