mirror of
https://github.com/hwanny1128/HGZero.git
synced 2025-12-06 20:46:23 +00:00
프로토타입 검토 결과, 화자 식별 기능이 현재 요구사항에서 제외되어 관련 코드 및 설계 문서를 제거하고 현행화했습니다. 변경사항: 1. 백엔드 코드 정리 - Speaker 관련 컨트롤러, 서비스, 리포지토리 삭제 - Speaker 도메인, DTO, 이벤트 클래스 삭제 - Recording 및 Transcription 서비스에서 화자 관련 로직 제거 2. API 명세 현행화 (stt-service-api.yaml) - 화자 식별/관리 API 엔드포인트 제거 (/speakers/*) - 응답 스키마에서 speakerId, speakerName 필드 제거 - 화자 관련 스키마 전체 제거 (Speaker*) - API 설명에서 화자 식별 관련 내용 제거 3. 설계 문서 현행화 - STT 녹음 시퀀스: 화자 식별 단계 제거 - STT 텍스트변환 시퀀스: 화자 정보 업데이트 로직 제거, 배치 모드 제거 - 실시간 전용 기능으로 단순화 영향: - 화자별 발언 구분 기능 제거 - 실시간 음성-텍스트 변환에만 집중 - 시스템 복잡도 감소 및 성능 개선 (초기화 시간: 1.1초 → 0.8초) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
119 lines
3.2 KiB
Plaintext
119 lines
3.2 KiB
Plaintext
@startuml
|
|
!theme mono
|
|
|
|
title STT Service - 음성-텍스트 변환 (실시간 전용)
|
|
|
|
participant "Frontend<<E>>" as Frontend
|
|
participant "API Gateway<<E>>" as Gateway
|
|
participant "TranscriptController" as Controller
|
|
participant "TranscriptService" as Service
|
|
participant "TranscriptionEngine" as Engine
|
|
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
|
|
|
|
== 음성 데이터 스트리밍 수신 ==
|
|
|
|
Frontend -> Gateway: POST /api/transcripts/stream\n(audioData, recordingId, timestamp)
|
|
activate Gateway
|
|
|
|
Gateway -> Controller: 음성 스트림 요청
|
|
activate Controller
|
|
|
|
Controller -> Service: processAudioStream(audioData, recordingId)
|
|
activate Service
|
|
|
|
Service -> Engine: streamingTranscribe(audioData)
|
|
activate Engine
|
|
|
|
Engine -> AzureClient: recognizeAsync(audioData)
|
|
activate AzureClient
|
|
|
|
AzureClient -> AzureClient: 실시간 음성 인식 수행
|
|
note right
|
|
Azure Speech 설정:
|
|
- Mode: Continuous
|
|
- 언어: ko-KR
|
|
- 타임스탬프 자동 기록
|
|
- 신뢰도 점수 계산
|
|
- Profanity filter
|
|
end note
|
|
|
|
AzureClient -> BlobStorage: 음성 파일 저장\n(chunk 단위 저장)
|
|
activate BlobStorage
|
|
BlobStorage --> AzureClient: 저장 완료
|
|
deactivate BlobStorage
|
|
|
|
AzureClient --> Engine: RecognitionResult\n(text, confidence, timestamp, duration)
|
|
deactivate AzureClient
|
|
|
|
== 정확도 검증 및 처리 ==
|
|
|
|
Engine -> Engine: validateConfidence(result)
|
|
note right
|
|
신뢰도 검증:
|
|
- Threshold: 0.7 (70%)
|
|
- confidence >= 80%: 정상 처리
|
|
- 60% <= confidence < 80%: 검토 권장
|
|
- confidence < 60%: 경고 플래그 설정
|
|
end note
|
|
|
|
Engine --> Service: transcription segment
|
|
deactivate Engine
|
|
|
|
== 변환 결과 저장 ==
|
|
|
|
Service -> TranscriptRepo: createTranscript(recordingId, segment)
|
|
activate TranscriptRepo
|
|
|
|
TranscriptRepo -> DB: 변환 결과 저장\n(텍스트ID, 녹음ID, 텍스트, 신뢰도, 타임스탬프, 경고플래그)
|
|
activate DB
|
|
DB --> TranscriptRepo: transcriptId 반환
|
|
deactivate DB
|
|
|
|
TranscriptRepo --> Service: TranscriptEntity 반환
|
|
deactivate TranscriptRepo
|
|
|
|
== 이벤트 발행 ==
|
|
|
|
Service -> EventHub: TranscriptSegmentReady 이벤트 발행
|
|
activate EventHub
|
|
note right of EventHub
|
|
이벤트 데이터:
|
|
- transcriptId
|
|
- recordingId
|
|
- meetingId
|
|
- text
|
|
- timestamp
|
|
- confidence
|
|
end note
|
|
EventHub --> Service: 발행 완료
|
|
deactivate EventHub
|
|
|
|
Service --> Controller: TranscriptResponse\n(transcriptId, text, confidence, warningFlag)
|
|
deactivate Service
|
|
|
|
Controller --> Gateway: 200 OK\n(transcriptId, text, timestamp, confidence)
|
|
deactivate Controller
|
|
|
|
Gateway --> Frontend: 실시간 자막 응답
|
|
deactivate Gateway
|
|
|
|
note over Frontend, EventHub
|
|
**처리 시간:**
|
|
- Azure STT 처리: 1-3초
|
|
- DB 저장: ~100ms
|
|
- Event 발행: ~50ms
|
|
- 총 처리 시간: 1-3초
|
|
|
|
**정확도 경고 기준:**
|
|
- < 60%: 수동 수정 권장 (경고 플래그)
|
|
- 60-80%: 검토 권장
|
|
- >= 80%: 정상
|
|
end note
|
|
|
|
@enduml
|