음성 낭독: 소수 뒤에 시/시간이 붙은 수(2.5시간)가 '이.다섯시간'으로 읽히던 버그 수정

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
kimandClaude Sonnet 5.5 committed 2026-10-19 23:25:34 +09:00
1 parent ebcf92ed7c
commit 76ba4e86e9
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -348,7 +348,7 @@ function _cleanForSpeech(text) {
.replace(/[\u{1F300}-\u{1FAFF}\u{2600}-\u{27BF}\u{1F1E6}-\u{1F1FF}\u{2190}-\u{21FF}\u{2B00}-\u{2BFF}\u{FE0F}]/gu, '')
// Hour numbers use native-Korean counting, not Sino-Korean — must run
// before the generic number pass below so "9시" doesn't become "구시".
.replace(/(\d{1,2})(\s*시간?)/g, _hourReplacer)
.replace(/(?<![\d.])(\d{1,2})(?!\d)(\s*시간?)/g, _hourReplacer)
// Final pass: every remaining numeral (including ones the unit
// conversions above just introduced digits next to, e.g. "27.7도")
// becomes spelled-out Hangul — this is the single biggest reliability
+1 -1
View File
@@ -516,7 +516,7 @@
.replace(/[\u{1F300}-\u{1FAFF}\u{2600}-\u{27BF}\u{1F1E6}-\u{1F1FF}\u{2190}-\u{21FF}\u{2B00}-\u{2BFF}\u{FE0F}]/gu, '')
// Hour numbers use native-Korean counting, not Sino-Korean — must run
// before the generic number pass below so "9시" doesn't become "구시".
.replace(/(\d{1,2})(\s*시간?)/g, _hourReplacer)
.replace(/(?<![\d.])(\d{1,2})(?!\d)(\s*시간?)/g, _hourReplacer)
// Final pass: every remaining numeral becomes spelled-out Hangul — the
// single biggest reliability win measured today (raw numerals: frequent
// digit swaps/drops; spelled-out: ~7/8 clean in repeated STT round-trip