From 90fe19f7ba2b9a9776d7c4bd99424ced9ff1c6bf Mon Sep 17 00:00:00 2001 From: kim Date: Tue, 20 Oct 2026 16:26:26 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=8C=EC=84=B1=20=ED=86=B5=ED=99=94:=20?= =?UTF-8?q?=EB=AA=A8=EB=8D=B8=EC=9D=B4=20=ED=99=95=EC=9D=B8=EC=B0=A8=20?= =?UTF-8?q?=EB=90=98=EB=AC=BC=EC=9D=80=20=EC=A7=81=ED=9B=84=20'=EC=9D=8C/?= =?UTF-8?q?=EC=9D=91'=EC=9D=84=20'=EB=84=A4'=EB=A1=9C=20=EC=A0=84=EB=8B=AC?= =?UTF-8?q?(=EB=A9=88=EC=B6=A4=20=EB=A7=90=EB=A1=9C=20=EB=B2=84=EB=A6=AC?= =?UTF-8?q?=EC=A7=80=20=EC=95=8A=EC=9D=8C)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 --- web-ui/js/voice/voice-call.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/web-ui/js/voice/voice-call.js b/web-ui/js/voice/voice-call.js index 1c006d7..7063aa1 100644 --- a/web-ui/js/voice/voice-call.js +++ b/web-ui/js/voice/voice-call.js @@ -307,13 +307,24 @@ case 'stt_final': { setCaption(''); - const text = (msg.text || '').trim(); + let text = (msg.text || '').trim(); if (spkEnrolling) { // 목소리 등록 중: 인식문은 채팅으로 보내지 않고 등록 표본 수만 갱신한다 state = 'listening'; setStatus('목소리 등록 중… 계속 말씀해 주세요'); if (ws && ws.readyState === WebSocket.OPEN) ws.send(JSON.stringify({ type: 'spk_enroll', action: 'status' })); break; } if (!text) { state = 'listening'; setStatus('듣는 중…'); break; } + // 모델이 확인차 되물은 직후(재생·생성이 끝난 상태)의 "음"/"응"은 "네"로 받는다 — 멈춤 말이 아니라 긍정 대답이다. + if (/^[\s.,!?~…]*(음+|응+|으응+|으음+|흠|웅)[\s.,!?~…]*$/.test(text)) { + let idle = true, asked = false; + try { + idle = !(typeof isThinking !== 'undefined' && isThinking) && !playbackActive && !ttsBusy && ttsQueue.length === 0; + const last = typeof chatHistory !== 'undefined' && chatHistory.length ? chatHistory[chatHistory.length - 1] : null; + const tail = last && last.role === 'ai' ? String(last.content || '').replace(/[\s*_`~)\]]+$/g, '') : ''; + asked = /[??]$/.test(tail); + } catch {} + if (idle && asked) text = '네'; + } // 멈춤 말("어", "잠깐", "그만", "스톱"…): 재생·생성을 끊고 대화로 보내지 않는다. if (/^[\s.,!?~…]*(어+|아+|으+|음+|잠깐|잠시만?|잠깐만|그만|멈춰|멈춰봐|스톱|스탑|stop|됐어|됐다|아니|아니야)[\s.,!?~…]*$/i.test(text)) { ttsQueue = [];