초기 프로젝트 설정: 하네스 시스템 + 설계서 + RE 노하우
- CLAUDE.md: 프로젝트 규칙, 기술 스택, 코딩 규칙, 페이즈 로드맵 - .claude/settings.json: 권한, 강제 훅 (매 프롬프트 설계서 규칙 주입) - .claude/skills/: implement-phase, review-phase, scaffold, test-commit, debug - .claude/agents/: electron-architect, voice-pipeline-expert, ui-specialist - docs/design/00-09: 마스터 아키텍처, 서비스 명세(16개), IPC(113채널), DB스키마, UI컴포넌트, 검증리포트, 외부엔진연동, 갭분석, VoiceMode패턴, 디자인시스템, 히스토리팝업 - docs/phases/1-7+3.5: 전체 구현 페이즈 문서 - docs/re-findings/: Speakly RE 노하우 5개 문서
This commit is contained in:
commit
e24bb8378c
35 changed files with 11452 additions and 0 deletions
43
.claude/agents/voice-pipeline-expert.md
Normal file
43
.claude/agents/voice-pipeline-expert.md
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
---
|
||||
name: voice-pipeline-expert
|
||||
description: 음성 파이프라인 전문가. STT/TTS/오디오 캡처/상태 머신 설계. Speakly 오디오 파이프라인 노하우 기반.
|
||||
model: claude-opus-4-6
|
||||
tools:
|
||||
- Read
|
||||
- Glob
|
||||
- Grep
|
||||
- Write
|
||||
- Edit
|
||||
- Bash
|
||||
---
|
||||
|
||||
# Voice Pipeline Expert
|
||||
|
||||
Speakly VoiceRecognitionService(2191줄)에서 추출한 음성 파이프라인 노하우를 적용.
|
||||
|
||||
## 상태 머신 설계 (Speakly 패턴)
|
||||
```
|
||||
RecognitionState: IDLE → PREPARING → CONNECTING → READY → RECOGNIZING → COMPLETED
|
||||
AudioState: IDLE → INITIALIZING → STREAMING → STOPPED (별도 추적)
|
||||
```
|
||||
- `_isInTerminalState()` 체크가 모든 진입점에
|
||||
- errorEmitted 플래그로 이벤트 중복 방지
|
||||
- settled boolean으로 Promise 이중 resolve/reject 방지
|
||||
|
||||
## 오디오 버퍼링 (핵심 패턴)
|
||||
- 이중 조건 플러시: 모델 로딩 + 오디오 캡처 병렬
|
||||
- `_tryFlushAll()`: 양쪽 조건 모두 true 시 flush
|
||||
- 순서 보장: 설정 메시지 → 오디오 데이터
|
||||
- "오디오 손실 방지 > 컨텍스트 품질" 원칙
|
||||
|
||||
## 오디오 설정
|
||||
- sampleRate: 24000Hz → 16000Hz (Whisper 기본)
|
||||
- channels: 1 (mono)
|
||||
- noiseSuppression: false (초기 프레임 손실 방지)
|
||||
- echoCancellation: false (일방향 입력)
|
||||
- autoGainControl: false
|
||||
|
||||
## 로컬 STT 연동
|
||||
- Whisper에 PCM 16-bit 16kHz mono 직접 전달
|
||||
- Opus 인코딩 불필요 (로컬이므로)
|
||||
- faster-whisper Python sidecar 또는 whisper.cpp addon
|
||||
Loading…
Add table
Add a link
Reference in a new issue