음성 낭독: 스트리밍 중 '107.'에서 문장을 잘라 소수점·앞자리가 빠지던 버그 수정

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
kimandClaude Sonnet 5.5 committed 2026-10-19 23:46:46 +09:00
1 parent 45c71dc466
commit 1a802596e3
1 file changed
+4
+4
View File
@@ -606,6 +606,10 @@
// half mid-decimal into two separate TTS calls (found 2026-07-10 while
// debugging why weather readouts sounded choppy).
if (text[i] === '.' && /\d/.test(text[i - 1] || '') && /\d/.test(text[i + 1] || '')) continue;
// 스트리밍으로 "107." 까지만 도착한 순간엔 다음 글자를 아직 모른다 — 그대로 문장 끝으로 자르면 "107"과 "11달러"가
// 따로 읽혀 소수점·앞자리가 사라진다(2026-10-19 "소숫점 앞의 숫자가 빠진다"). 숫자 뒤 마침표가 버퍼 끝이면 더 받을 때까지 둔다.
// 턴이 끝나면 남은 꼬리는 별도로 낭독된다(finalText 경로).
if (text[i] === '.' && /\d/.test(text[i - 1] || '') && i === text.length - 1) break;
if (/[.!?\n]/.test(text[i])) {
const boundaryChar = text[i];
let j = i + 1;