fix: add terminal period after comma-joined list items
Without a period, the last list item runs directly into the following paragraph (e.g. "Hong Kong As for the percentage..."), producing text that the G2P cannot phonemize. Adding a period creates a proper sentence boundary so the chunker splits cleanly. https://claude.ai/code/session_01965m1v3f1cK6gDV1JHioA8
+6 −1 · 1 file changed
-
src/tts_provider.py+6 −1
@@ -674,7 +674,12 @@ class KokoroTTSProvider(BaseTTSProvider): def _flush_list(): if list_buf: - merged.append(', '.join(list_buf)) + joined = ', '.join(list_buf) + # End the list with a period so it forms a sentence + # boundary and doesn't run into the next paragraph. + if not re.search(r'[.!?]\s*$', joined): + joined += '.' + merged.append(joined) list_buf.clear() for line in lines: