mirror of
https://github.com/hwanny1128/HGZero.git
synced 2025-12-06 07:56:24 +00:00
주요 변경사항:
[Critical]
- API 엔드포인트 통일: POST /api/minutes/{minutesId}/finalize
- 이벤트 이름 표준화: MinutesFinalized
[Warning]
- API Gateway 라우팅 규칙 문서화 (외부 시퀀스 7개 파일)
- 대시보드 API 경로 통일: GET /api/dashboard
- AI 제안 병합 프로세스 상세 문서화
- 회의록 확정 검증 로직 5단계 상세화
[Minor]
- Redis 캐시 TTL 명시 (7개 파일, TTL 정책 표준화)
- 대시보드 페이지네이션 파라미터 추가
- 에러 응답 포맷 표준화 (14개 에러 응답)
총 31개 파일 수정, 34건의 개선 사항 적용
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
146 lines
3.8 KiB
Plaintext
146 lines
3.8 KiB
Plaintext
@startuml
|
|
!theme mono
|
|
|
|
title 음성-텍스트 변환 내부 시퀀스 (UFR-STT-020)
|
|
|
|
participant "API Gateway<<E>>" as Gateway
|
|
participant "SttController" as Controller
|
|
participant "SttService" as Service
|
|
participant "TranscriptionEngine" as Engine
|
|
participant "Azure Speech<<E>>" as Speech
|
|
participant "SttRepository" as Repository
|
|
database "PostgreSQL<<E>>" as DB
|
|
queue "Event Hub<<E>>" as EventHub
|
|
|
|
Gateway -> Controller: POST /api/v1/stt/transcribe\n{sessionId, audioFile}
|
|
activate Controller
|
|
|
|
Controller -> Service: transcribeAudio(sessionId, audioFile)
|
|
activate Service
|
|
|
|
Service -> Repository: findSessionById(sessionId)
|
|
activate Repository
|
|
Repository -> DB: STT 세션 조회\n(세션ID 기준)
|
|
DB --> Repository: session data
|
|
Repository --> Service: SttSession entity
|
|
deactivate Repository
|
|
|
|
alt 실시간 변환 모드
|
|
Service -> Engine: streamingTranscribe(audioFile)
|
|
activate Engine
|
|
|
|
Engine -> Speech: createRecognizer()\nsetContinuousRecognition()
|
|
note right
|
|
Azure Speech 설정:
|
|
- Mode: Continuous
|
|
- Language: ko-KR
|
|
- Enable diarization
|
|
- Profanity filter
|
|
end note
|
|
|
|
Speech --> Engine: recognizer instance
|
|
|
|
loop 오디오 청크 처리
|
|
Engine -> Speech: recognizeOnceAsync(audioChunk)
|
|
Speech --> Engine: recognition result
|
|
note right
|
|
결과 포함:
|
|
- Text
|
|
- Confidence
|
|
- Duration
|
|
- Speaker ID
|
|
end note
|
|
|
|
Engine -> Engine: validateConfidence(result)
|
|
note right
|
|
신뢰도 검증:
|
|
- Threshold: 0.7
|
|
- Low confidence 처리
|
|
end note
|
|
|
|
Engine --> Service: transcription segment
|
|
|
|
Service -> Repository: saveSttSegment(segment)
|
|
activate Repository
|
|
Repository -> DB: STT 세그먼트 저장\n(세션ID, 텍스트, 신뢰도, 타임스탬프)
|
|
DB --> Repository: saved
|
|
Repository --> Service: segment saved
|
|
deactivate Repository
|
|
|
|
Service -> EventHub: publish(TranscriptionSegmentEvent)
|
|
note right
|
|
Event:
|
|
- sessionId
|
|
- segmentId
|
|
- text
|
|
- timestamp
|
|
end note
|
|
end
|
|
|
|
Engine --> Service: streaming complete
|
|
deactivate Engine
|
|
|
|
else 배치 변환 모드
|
|
Service -> Engine: batchTranscribe(audioFile)
|
|
activate Engine
|
|
|
|
Engine -> Speech: batchTranscriptionAsync(audioUrl)
|
|
note right
|
|
배치 처리:
|
|
- 전체 파일 업로드
|
|
- 백그라운드 처리
|
|
- Callback URL 제공
|
|
end note
|
|
|
|
Speech --> Engine: transcription job ID
|
|
|
|
Engine --> Service: job submitted
|
|
deactivate Engine
|
|
|
|
Service -> Repository: updateSessionStatus(sessionId, "PROCESSING")
|
|
activate Repository
|
|
Repository -> DB: 세션 상태 업데이트\n(상태='처리중')
|
|
DB --> Repository: updated
|
|
Repository --> Service: updated
|
|
deactivate Repository
|
|
end
|
|
|
|
Service -> Repository: aggregateTranscription(sessionId)
|
|
activate Repository
|
|
Repository -> DB: 세그먼트 목록 조회\n(세션ID 기준, 타임스탬프 순 정렬)
|
|
DB --> Repository: segments
|
|
Repository --> Service: ordered segments
|
|
deactivate Repository
|
|
|
|
Service -> Service: mergeSegments(segments)
|
|
note right
|
|
세그먼트 병합:
|
|
- 화자별 그룹화
|
|
- 시간 순서 정렬
|
|
- 문장 경계 보정
|
|
end note
|
|
|
|
Service -> Repository: saveTranscription(fullText)
|
|
activate Repository
|
|
Repository -> DB: 전체 텍스트 저장 및 상태 업데이트\n(전체텍스트, 상태='완료')
|
|
DB --> Repository: saved
|
|
Repository --> Service: updated session
|
|
deactivate Repository
|
|
|
|
Service -> EventHub: publish(TranscriptionCompletedEvent)
|
|
note right
|
|
Event:
|
|
- sessionId
|
|
- meetingId
|
|
- fullText
|
|
- completedAt
|
|
end note
|
|
|
|
Service --> Controller: TranscriptionResponse\n{sessionId, text, segments}
|
|
deactivate Service
|
|
|
|
Controller --> Gateway: 200 OK\n{transcription, metadata}
|
|
deactivate Controller
|
|
|
|
@enduml
|