mirror of
https://github.com/hwanny1128/HGZero.git
synced 2026-06-13 10:39:11 +00:00
STT 서비스 음성 인식 및 AI 제안사항 표시 기능 구현
- PCM 16kHz 포맷 지원으로 Azure Speech 인식 성공 - WebSocket 실시간 전송 기능 추가 - DB 저장 로직 제거 (AI 서비스에서 제안사항 저장) - AI SSE 기반 제안사항 표시 테스트 페이지 추가 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -50,31 +50,29 @@ public class EventHubConfig {
|
||||
|
||||
@PostConstruct
|
||||
public void startEventProcessor() {
|
||||
// Checkpoint Storage가 설정되지 않은 경우 Event Hub 기능 비활성화
|
||||
if (checkpointStorageConnectionString == null || checkpointStorageConnectionString.isEmpty()) {
|
||||
log.warn("Event Hub Processor 비활성화 - checkpoint storage 설정이 없습니다. " +
|
||||
"개발 환경에서는 Event Hub 없이 실행 가능하며, 운영 환경에서는 AZURE_CHECKPOINT_STORAGE_CONNECTION_STRING 환경 변수를 설정해야 합니다.");
|
||||
return;
|
||||
}
|
||||
|
||||
log.info("Event Hub Processor 시작 - eventhub: {}, consumerGroup: {}",
|
||||
eventHubName, consumerGroup);
|
||||
|
||||
// Blob Checkpoint Store 생성 (체크포인트 저장소)
|
||||
BlobContainerAsyncClient blobContainerAsyncClient = new BlobContainerClientBuilder()
|
||||
.connectionString(checkpointStorageConnectionString)
|
||||
.containerName(checkpointContainer)
|
||||
.buildAsyncClient();
|
||||
|
||||
// Event Processor Client 빌드
|
||||
eventProcessorClient = new EventProcessorClientBuilder()
|
||||
EventProcessorClientBuilder builder = new EventProcessorClientBuilder()
|
||||
.connectionString(connectionString, eventHubName)
|
||||
.consumerGroup(consumerGroup)
|
||||
.checkpointStore(new BlobCheckpointStore(blobContainerAsyncClient))
|
||||
.processEvent(this::processEvent)
|
||||
.processError(this::processError)
|
||||
.buildEventProcessorClient();
|
||||
.processError(this::processError);
|
||||
|
||||
// Checkpoint Storage 설정
|
||||
if (checkpointStorageConnectionString != null && !checkpointStorageConnectionString.isEmpty()) {
|
||||
log.info("Checkpoint Storage 활성화 (Azure Blob) - container: {}", checkpointContainer);
|
||||
BlobContainerAsyncClient blobContainerAsyncClient = new BlobContainerClientBuilder()
|
||||
.connectionString(checkpointStorageConnectionString)
|
||||
.containerName(checkpointContainer)
|
||||
.buildAsyncClient();
|
||||
builder.checkpointStore(new BlobCheckpointStore(blobContainerAsyncClient));
|
||||
} else {
|
||||
log.warn("Checkpoint Storage 미설정 - InMemory 모드 사용 (MVP 개발용, 재시작 시 처음부터 읽음)");
|
||||
builder.checkpointStore(new InMemoryCheckpointStore());
|
||||
}
|
||||
|
||||
eventProcessorClient = builder.buildEventProcessorClient();
|
||||
eventProcessorClient.start();
|
||||
|
||||
log.info("Event Hub Processor 시작 완료");
|
||||
|
||||
Reference in New Issue
Block a user