Phase 12~13 전체 구현: Pro+ 피처 6종 + 음성 대화 + RAG + OS 자동화
Phase 12: - FileTranscriptionService: ffmpeg PCM 변환 + 30초 청크 순차 STT - MeetingSummaryService: 자막 세션 → LLM 자동 요약 + DB summaryText - DictationTemplateService: 필드별 음성 입력 상태 머신 + 프리셋 3개 Phase 13.1: - VoiceConversationService: STT→Ollama /api/chat→TTS 대화 루프 (10턴) - TTSPlaybackService: Windows SAPI 문장 단위 큐 재생 - LocalLLMService.chatStream: Ollama /api/chat 스트리밍 Phase 13.2: - RAGService: Ollama 임베딩 + SQLite 벡터 + 코사인 유사도 검색 - KnowledgeBasePage: 문서 관리 + 질문/답변 UI - PDF 파서: zlib FlateDecode 해제 + BT/ET 텍스트 추출 Phase 13.3: - VoiceActionService: LLM JSON 액션 플랜 생성 + 실행 - 프리셋 6개 (크롬/메모장/탐색기/볼륨), 위험 명령 차단 공통: IPC ~70채널, 에러코드 780-878, i18n 100+키 버그픽스: 라이선스 로컬 키 우선, i18n featureLabel, DOM 중첩
This commit is contained in:
parent
a31f96bbb8
commit
eb83682269
38 changed files with 5678 additions and 19 deletions
|
|
@ -432,7 +432,7 @@ export interface HistoryEntry {
|
|||
focusedApp: string | null
|
||||
focusedAppName: string | null
|
||||
focusedAppWindowTitle: string | null
|
||||
mode: 'dictation' | 'translate' | 'command'
|
||||
mode: 'dictation' | 'translate' | 'command' | 'caption' | 'file-transcription'
|
||||
status: 'completed' | 'cancelled' | 'error'
|
||||
errorCode: string | null
|
||||
audioLocalPath: string | null
|
||||
|
|
@ -447,6 +447,8 @@ export interface HistoryEntry {
|
|||
createdAt: number
|
||||
updatedAt: number
|
||||
appVersion: string
|
||||
/** Phase 12.2: 회의록 요약 마크다운 */
|
||||
summaryText: string | null
|
||||
}
|
||||
|
||||
export interface HistoryQueryParams {
|
||||
|
|
@ -947,3 +949,316 @@ export interface TierComparison {
|
|||
pro: boolean | string
|
||||
proPlus: boolean | string
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// Phase 12: File Transcription (12.1)
|
||||
// ============================================================
|
||||
|
||||
export type FileTranscriptionState = 'idle' | 'converting' | 'transcribing' | 'completed' | 'error'
|
||||
|
||||
export interface FileTranscriptionStartParams {
|
||||
filePath: string
|
||||
language?: string
|
||||
}
|
||||
|
||||
export interface FileTranscriptionProgress {
|
||||
jobId: string
|
||||
currentChunk: number
|
||||
totalChunks: number
|
||||
percent: number
|
||||
currentText: string
|
||||
}
|
||||
|
||||
export interface FileTranscriptionSegment {
|
||||
text: string
|
||||
start: number
|
||||
end: number
|
||||
confidence: number
|
||||
}
|
||||
|
||||
export interface FileTranscriptionResult {
|
||||
jobId: string
|
||||
filePath: string
|
||||
fileName: string
|
||||
fullText: string
|
||||
segments: FileTranscriptionSegment[]
|
||||
totalDurationSec: number
|
||||
processingTimeMs: number
|
||||
}
|
||||
|
||||
export interface FileTranscriptionStateInfo {
|
||||
state: FileTranscriptionState
|
||||
jobId: string | null
|
||||
progress: FileTranscriptionProgress | null
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// Phase 12: Meeting Summary (12.2)
|
||||
// ============================================================
|
||||
|
||||
export interface MeetingSummaryResult {
|
||||
historyId: string
|
||||
summary: string
|
||||
decisions: string[]
|
||||
actionItems: string[]
|
||||
rawMarkdown: string
|
||||
generatedAt: number
|
||||
}
|
||||
|
||||
export interface MeetingSummarizeParams {
|
||||
historyId: string
|
||||
}
|
||||
|
||||
export interface MeetingSummaryGetParams {
|
||||
historyId: string
|
||||
}
|
||||
|
||||
export interface MeetingSummaryExportParams {
|
||||
historyId: string
|
||||
}
|
||||
|
||||
export interface MeetingSummaryProgress {
|
||||
historyId: string
|
||||
status: 'generating' | 'done' | 'error'
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// Phase 12: Dictation Templates (12.3)
|
||||
// ============================================================
|
||||
|
||||
export interface TemplateField {
|
||||
id: string
|
||||
name: string
|
||||
label: string
|
||||
promptText: string
|
||||
required: boolean
|
||||
maxDurationSec: number
|
||||
}
|
||||
|
||||
export interface DictationTemplate {
|
||||
id: string
|
||||
name: string
|
||||
description: string
|
||||
fields: TemplateField[]
|
||||
outputFormat: string
|
||||
isBuiltin: boolean
|
||||
createdAt: number
|
||||
updatedAt: number
|
||||
}
|
||||
|
||||
export interface CreateTemplateParams {
|
||||
name: string
|
||||
description: string
|
||||
fields: TemplateField[]
|
||||
outputFormat: string
|
||||
}
|
||||
|
||||
export interface UpdateTemplateParams {
|
||||
id: string
|
||||
name?: string
|
||||
description?: string
|
||||
fields?: TemplateField[]
|
||||
outputFormat?: string
|
||||
}
|
||||
|
||||
export interface DeleteTemplateParams {
|
||||
id: string
|
||||
}
|
||||
|
||||
export type TemplateSessionState =
|
||||
| 'idle'
|
||||
| 'field-prompting'
|
||||
| 'field-recording'
|
||||
| 'completing'
|
||||
|
||||
export interface TemplateSessionInfo {
|
||||
templateId: string
|
||||
templateName: string
|
||||
state: TemplateSessionState
|
||||
currentFieldIndex: number
|
||||
totalFields: number
|
||||
currentField: TemplateField | null
|
||||
fieldValues: Record<string, string>
|
||||
}
|
||||
|
||||
export interface StartTemplateSessionParams {
|
||||
templateId: string
|
||||
}
|
||||
|
||||
export interface SetFieldValueParams {
|
||||
fieldId: string
|
||||
value: string
|
||||
}
|
||||
|
||||
export interface TemplateFieldCompletedEvent {
|
||||
fieldId: string
|
||||
fieldName: string
|
||||
value: string
|
||||
nextField: TemplateField | null
|
||||
}
|
||||
|
||||
export interface TemplateSessionCompletedEvent {
|
||||
templateId: string
|
||||
outputText: string
|
||||
fieldValues: Record<string, string>
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// Phase 13: Voice Conversation (13.1)
|
||||
// ============================================================
|
||||
|
||||
export type ConversationState =
|
||||
| 'idle'
|
||||
| 'listening'
|
||||
| 'thinking'
|
||||
| 'speaking'
|
||||
|
||||
export type ConversationRole = 'user' | 'assistant' | 'system'
|
||||
|
||||
export interface ConversationMessage {
|
||||
id: string
|
||||
role: ConversationRole
|
||||
content: string
|
||||
timestamp: number
|
||||
}
|
||||
|
||||
export interface ConversationSessionInfo {
|
||||
state: ConversationState
|
||||
messages: ConversationMessage[]
|
||||
isActive: boolean
|
||||
}
|
||||
|
||||
export interface ConversationSendParams {
|
||||
text: string
|
||||
}
|
||||
|
||||
export interface ConversationAssistantDelta {
|
||||
messageId: string
|
||||
delta: string
|
||||
accumulated: string
|
||||
}
|
||||
|
||||
export interface ConversationAssistantMessage {
|
||||
messageId: string
|
||||
content: string
|
||||
}
|
||||
|
||||
export interface ConversationError {
|
||||
message: string
|
||||
phase: 'stt' | 'llm' | 'tts'
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// Phase 13: Local RAG (13.2)
|
||||
// ============================================================
|
||||
|
||||
export interface RAGDocument {
|
||||
id: string
|
||||
fileName: string
|
||||
filePath: string
|
||||
fileType: 'txt' | 'md' | 'pdf' | 'docx'
|
||||
chunkCount: number
|
||||
indexed: boolean
|
||||
indexedAt: number | null
|
||||
addedAt: number
|
||||
}
|
||||
|
||||
export interface RAGChunk {
|
||||
id: string
|
||||
documentId: string
|
||||
content: string
|
||||
embedding: number[]
|
||||
chunkIndex: number
|
||||
}
|
||||
|
||||
export interface RAGQueryParams {
|
||||
query: string
|
||||
topK?: number
|
||||
}
|
||||
|
||||
export interface RAGQueryResult {
|
||||
query: string
|
||||
results: Array<{
|
||||
documentId: string
|
||||
fileName: string
|
||||
content: string
|
||||
similarity: number
|
||||
}>
|
||||
/** LLM 답변 (컨텍스트 주입 후) */
|
||||
answer: string
|
||||
}
|
||||
|
||||
export interface RAGAddDocumentParams {
|
||||
filePath: string
|
||||
}
|
||||
|
||||
export interface RAGRemoveDocumentParams {
|
||||
documentId: string
|
||||
}
|
||||
|
||||
export interface RAGIndexProgress {
|
||||
documentId: string
|
||||
fileName: string
|
||||
currentChunk: number
|
||||
totalChunks: number
|
||||
percent: number
|
||||
}
|
||||
|
||||
export type RAGState = 'idle' | 'indexing' | 'querying'
|
||||
|
||||
export interface RAGStateInfo {
|
||||
state: RAGState
|
||||
documentCount: number
|
||||
totalChunks: number
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// Phase 13: Voice Action / OS Automation (13.3)
|
||||
// ============================================================
|
||||
|
||||
export type VoiceActionType =
|
||||
| 'open_app'
|
||||
| 'open_url'
|
||||
| 'open_file'
|
||||
| 'keyboard_shortcut'
|
||||
| 'type_text'
|
||||
| 'system_command'
|
||||
|
||||
export interface VoiceActionPlan {
|
||||
action: VoiceActionType
|
||||
target: string
|
||||
description: string
|
||||
safe: boolean
|
||||
}
|
||||
|
||||
export interface VoiceActionExecuteParams {
|
||||
text: string
|
||||
}
|
||||
|
||||
export interface VoiceActionPreset {
|
||||
keywords: string[]
|
||||
action: VoiceActionPlan
|
||||
}
|
||||
|
||||
export interface VoiceActionHistoryEntry {
|
||||
id: string
|
||||
userText: string
|
||||
plan: VoiceActionPlan
|
||||
executed: boolean
|
||||
timestamp: number
|
||||
}
|
||||
|
||||
export interface VoiceActionPlannedEvent {
|
||||
plan: VoiceActionPlan
|
||||
userText: string
|
||||
}
|
||||
|
||||
export interface VoiceActionExecutedEvent {
|
||||
plan: VoiceActionPlan
|
||||
success: boolean
|
||||
}
|
||||
|
||||
export interface VoiceActionErrorEvent {
|
||||
message: string
|
||||
userText: string
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue