diff --git a/app/Services/GoogleCloudService.php b/app/Services/GoogleCloudService.php index 960907b9..7dfa1357 100644 --- a/app/Services/GoogleCloudService.php +++ b/app/Services/GoogleCloudService.php @@ -442,6 +442,12 @@ private function parseDiarizationResult(array $operationResult): ?array $startMs = $this->parseGoogleTimeToMs($word['startTime'] ?? '0s'); $endMs = $this->parseGoogleTimeToMs($word['endTime'] ?? '0s'); + // 언더스코어만으로 구성된 노이즈 단어 제거 + $cleanWord = preg_replace('/^_+$/', '', $wordText); + if ($cleanWord === '') { + continue; + } + if ($speakerTag !== $currentSpeaker && $currentSpeaker !== null && ! empty($currentWords)) { $segments[] = [ 'speaker_name' => '화자 ' . $currentSpeaker, @@ -456,7 +462,7 @@ private function parseDiarizationResult(array $operationResult): ?array } $currentSpeaker = $speakerTag; - $currentWords[] = $wordText; + $currentWords[] = $cleanWord; } // 마지막 세그먼트 diff --git a/resources/views/juil/meeting-minutes.blade.php b/resources/views/juil/meeting-minutes.blade.php index b47fbd8b..477eaadc 100644 --- a/resources/views/juil/meeting-minutes.blade.php +++ b/resources/views/juil/meeting-minutes.blade.php @@ -796,7 +796,7 @@ function ConversationView({ segments, interimText, isRecording, currentSpeaker, )}
- {group.texts.map((t, ti) => {ti > 0 ? ' ' : ''}{t.text})} + {group.texts.map((t, ti) => {ti > 0 ? ' ' : ''}{t.text.replace(/_+/g, '')})}
);