Chinese TTS silently drops text segments in mid-sentence during inference
Environment
- audiblez: 0.4.9, kokoro: 0.7.16
- OS: Windows 10, CPU only
- CPU: AMD Ryzen 5 2600
- Voice: zf_xiaoni (Mandarin Chinese)
Problem
after my own this change: https://github.com/santinic/audiblez/issues/83#issuecomment-5235070951 When converting Chinese EPUB to audiobook, text segments are silently dropped from the middle of sentences—not truncated from the end. and the speed from 50 chars/s to 5 chars/s
Reproduction
Input (56 chars): "那时候我就希望能写一本书来介绍他,或者将他的一部分诗词文章译成英文,就算做不到,我也希望出国期间他能陪在我身边。"
Audio output is missing "就算做不到" (middle of sentence, 6 chars).
Root Cause Analysis
ZHG2P (Misaki) — Verified via
KPipeline(lang_code='z', model=False). All sub-clauses produce valid phonemes. NOT the cause.510-phoneme truncation (
pipeline.pyL375-377) — Triggers for >150 Chinese chars. IS a cause for long sentences, but NOT for the 56-char example above.KModel.forward() — The actual inference step. For reasons TBD, certain phoneme sequences produce near-silent output in mid-sentence, indistinguishable from "dropped" text.
Partial Mitigation
Splitting long Chinese sentences at punctuation before passing to pipeline isolates faulty sub-clauses. See detailed analysis in comment.
Patch location: audiblez/core.py → gen_audio_segments()
Source: santinic/audiblez