mirror of
https://github.com/hwanny1128/HGZero.git
synced 2025-12-06 19:36:23 +00:00
- 총 21개 PlantUML 파일 생성 (Meeting 10개, AI 6개, STT 2개, Notification 3개) - 서브 에이전트를 활용한 병렬 설계로 효율성 극대화 - 모든 시나리오는 유저스토리 및 외부 시퀀스와 1:1 매칭 - Controller → Service → Repository 계층 구조 명확히 표현 - Redis Cache, Azure Event Hubs 등 인프라 컴포넌트 표시 - 동기(→)/비동기(-->) 구분 명확 - 외부 참여자 <<E>> 표시 적용 - PlantUML 문법 검사 및 오류 수정 완료 (13개 파일 수정) - par/and 블록 문법 오류 수정 - return 형식 적용으로 참여자 없는 화살표 오류 해결 설계 특징: - 캐시 전략: Cache-Aside 패턴, TTL 관리, 즉시 무효화 - 비동기 처리: Azure Event Hubs 기반 이벤트 구독 - 실시간 협업: WebSocket 기반 동기화, 변경 델타 전송 - 데이터 일관성: 버전 관리, 양방향 연결, 트랜잭션 처리 추가 파일: - claude/sequence-inner-design.md: 내부시퀀스설계 가이드 - tools/check-plantuml.ps1: PlantUML 문법 검사 스크립트 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
116 lines
3.0 KiB
Plaintext
116 lines
3.0 KiB
Plaintext
@startuml
|
|
!theme mono
|
|
|
|
title STT Service - 음성텍스트변환 내부 시퀀스
|
|
|
|
participant "Frontend<<E>>" as Frontend
|
|
participant "TranscriptController" as Controller
|
|
participant "TranscriptService" as Service
|
|
participant "RecordingRepository" as RecordingRepo
|
|
participant "TranscriptRepository" as TranscriptRepo
|
|
participant "AzureSpeechClient" as AzureClient
|
|
database "STT DB" as DB
|
|
database "Azure Blob Storage<<E>>" as BlobStorage
|
|
queue "Azure Event Hubs<<E>>" as EventHub
|
|
|
|
== 음성 데이터 스트리밍 수신 (5초 간격 배치) ==
|
|
|
|
Frontend -> Controller: POST /api/transcripts/stream\n(audioData, recordingId, timestamp)
|
|
activate Controller
|
|
|
|
Controller -> Service: processAudioStream(audioData, recordingId)
|
|
activate Service
|
|
|
|
== 음성 인식 처리 ==
|
|
|
|
Service -> AzureClient: recognizeAudio(audioData)
|
|
activate AzureClient
|
|
|
|
AzureClient -> AzureClient: 음성 인식 수행
|
|
note right
|
|
- 실시간 STT 처리
|
|
- 화자 식별 (Speaker Diarization)
|
|
- 타임스탬프 자동 기록
|
|
- 신뢰도 점수 계산
|
|
end note
|
|
|
|
AzureClient -> BlobStorage: 음성 파일 저장\n(chunk 단위 저장)
|
|
activate BlobStorage
|
|
BlobStorage --> AzureClient: 저장 완료
|
|
deactivate BlobStorage
|
|
|
|
AzureClient --> Service: RecognitionResult\n(text, speakerId, confidence, timestamp)
|
|
deactivate AzureClient
|
|
|
|
== 정확도 검증 및 처리 ==
|
|
|
|
Service -> Service: 정확도 점수 검증
|
|
note right
|
|
confidence >= 60%: 정상 처리
|
|
confidence < 60%: 경고 플래그 설정
|
|
end note
|
|
|
|
== 변환 결과 저장 ==
|
|
|
|
Service -> TranscriptRepo: createTranscript(recordingId, text, metadata)
|
|
activate TranscriptRepo
|
|
|
|
TranscriptRepo -> DB: INSERT INTO transcripts\n(transcript_id, recording_id, speaker_id,\ntext, confidence, timestamp, warning_flag,\ncreated_at)
|
|
activate DB
|
|
DB --> TranscriptRepo: transcriptId 반환
|
|
deactivate DB
|
|
|
|
TranscriptRepo --> Service: TranscriptEntity 반환
|
|
deactivate TranscriptRepo
|
|
|
|
== 화자 정보 업데이트 ==
|
|
|
|
Service -> RecordingRepo: updateSpeakerInfo(recordingId, speakerId)
|
|
activate RecordingRepo
|
|
|
|
RecordingRepo -> DB: INSERT INTO speakers\n(recording_id, speaker_id, segment_count)\nON CONFLICT UPDATE segment_count
|
|
activate DB
|
|
DB --> RecordingRepo: 업데이트 완료
|
|
deactivate DB
|
|
|
|
RecordingRepo --> Service: 완료
|
|
deactivate RecordingRepo
|
|
|
|
== 이벤트 발행 ==
|
|
|
|
Service -> EventHub: TranscriptReady 이벤트 발행
|
|
activate EventHub
|
|
note right of EventHub
|
|
이벤트 데이터:
|
|
- transcriptId
|
|
- recordingId
|
|
- meetingId
|
|
- text
|
|
- speakerId
|
|
- timestamp
|
|
- confidence
|
|
end note
|
|
EventHub --> Service: 발행 완료
|
|
deactivate EventHub
|
|
|
|
Service --> Controller: TranscriptResponse\n(transcriptId, text, confidence, warningFlag)
|
|
deactivate Service
|
|
|
|
Controller --> Frontend: 200 OK\n(transcriptId, text, speakerId, timestamp, confidence)
|
|
deactivate Controller
|
|
|
|
note over Frontend, EventHub
|
|
처리 시간:
|
|
- Azure STT 처리: 1-3초
|
|
- DB 저장: ~100ms
|
|
- Event 발행: ~50ms
|
|
- 총 처리 시간: 1-4초
|
|
|
|
정확도 경고:
|
|
- 60% 미만: 수동 수정 권장
|
|
- 60-80%: 검토 권장
|
|
- 80% 이상: 정상
|
|
end note
|
|
|
|
@enduml
|