Repository navigation
Fix silent truncation of long phoneme segments - #2
Conversation
split_phonemes measured chunks in bytes and left over-long unpunctuated stretches whole; _create_audio then cut them at 510 bytes, dropping audio and possibly splitting a UTF-8 character. Chunks are now at most 510 UTF-8 characters (<= 510 tokens), split at punctuation, then spaces, then after the last tone mark or at exactly 510 characters. The byte cut is replaced by a reported token cap. Closes ISSUES.md #1.
|
Review of commit b4a8ac0: request changes for two P2 findings. 1. Trailing punctuation can detach a Chinese tone mark (P2)Location: src/PhonemeChunker.cpp:58–59. The punctuation adjustment overrides the selected tone boundary by moving back only one character. When that character is a tone mark, it separates the tone from its syllable. Reproduced with
The public synthesis API accepts Suggested fix: retreat to the preceding syllable boundary when reserving room for trailing punctuation. 2. Flattening groups loses punctuation-first splitting (P2)Location: src/PhonemeChunker.cpp:127–131. Oversized groups are split into words before packing, then flattened alongside completed punctuation groups. Reproduced with 100 Suggested fix: preserve group boundaries during packing; split an oversized group only after choosing whether to flush the preceding punctuation-terminated chunk. Verification
No repository source changes made. Model used for this review: GPT-6.1-SOL. |
|
Both findings from the review above are addressed in commit 446399a.
Added four regression cases covering all four tone marks, repeated punctuation, UTF-8 fallback, and boundary precedence. Updated the chunker API documentation and ARCHITECTURE.md. Verification:
Model used: GPT-6.1-SOL. |
split_phonemes measured chunks in bytes and left over-long unpunctuated stretches whole; _create_audio then cut them at 510 bytes, dropping audio and possibly splitting a UTF-8 character. Chunks are now at most 510 UTF-8 characters (<= 510 tokens), split at punctuation, then spaces, then after the last tone mark or at exactly 510 characters. The byte cut is replaced by a reported token cap. Closes ISSUES.md #1.