Skip to content

Chunk Irodori-TTS text at 100 characters by default - #1027

Merged
0xShug0 merged 1 commit into
0xShug0:mainfrom
hiroki-abe-58:irodori-tts-chunk-size
Oct 21, 2026
Merged

0xShug0 merged 1 commit into
0xShug0:mainfrom
hiroki-abe-58:irodori-tts-chunk-size

Conversation

@hiroki-abe-58

Copy link
Copy Markdown
Contributor

Irodori-TTS chunks long text at max_text_len, the 256-token text window, applied as 256 characters. Each chunk, however, is generated within max_duration_sec (30 s by default), which is about 160 Japanese characters at the model's pace. A chunk of about 240 characters needs about 45 s of speech. It is squeezed into 30 s and its second half comes out garbled, without an error or warning.

On a 404-character text, the first default chunk ends like this (Whisper transcript):

…そこでは毎部の読み聞かせ会が教師で、子供向けのシャナニコーシャス。昔橋に合わせて選んだ物語を…

The source reads:

…そこでは毎週土曜日の午後に、子ども向けの読み聞かせ会が開かれています。読み手を務めるのは近所に住む元教師で、昔話から最新の絵本まで、季節に合わせて選んだ物語を…

Upstream Irodori-TTS synthesizes one utterance of at most 30 s and doesn't chunk. The author's Irodori-TTS-Server does long text by splitting at the first punctuation mark after 80 non-space characters (IRODORI_DEFAULT_CHUNK_MIN_CHARS=80).

This PR makes the default 100 characters, still capped by max_text_len if a checkpoint's window is smaller. An explicit text_chunk_size still wins. The spec and docs are updated.

Measurements

RTX 5090, Windows 11, CUDA build (120a-real), irodori-tts-v4-small-q8_0.gguf. CER is from Whisper large-v3-turbo with sequential long-form decoding. "main" is main's default; "100" is this PR's default.

text mode seeds main 100 audio, main → 100
404 chars no_ref=true 1–4 0.170 0.021 58.6 s → 74.7 s
304 chars no_ref=true 1–4 0.320 0.050 40.4 s → 59.4 s
404 chars duration_scale=1.3 1–2 0.154 0.021 60.0 s → 97.1 s
304 chars duration_scale=1.3 1–2 0.345 0.047 43.6 s → 77.3 s
404 chars voice clone (2.6 s reference) 1–2 0.227 0.024 59.8 s → 81.0 s
304 chars voice clone 1–2 0.364 0.043 41.4 s → 64.6 s
141 chars no_ref=true 1–4 0.012 0.008 27.0 s → 27.4 s

Other chunk sizes:

  • At 150, the 304-character text scores 0.066.
  • With duration_scale=1.3, 150 already loses time (90.0 s and 71.5 s of audio), so it leaves no headroom for slower speech.
  • At 120, the voice-clone case scores 0.043 on the 404-character text.

Cost and memory:

  • More chunks cost about 15 % more wall time on the 404-character text (6.7 s → 7.7 s), for 28 % more audio.
  • Peak VRAM falls, because the codec decodes shorter chunks: 6.5–7.2 GiB → 4.2–4.8 GiB above idle.

Byte checks:

  • The default output of this PR is identical to main with --text-chunk-size 100 (20 WAVs across all the modes above).
  • A 47-character text is identical to --text-chunk-size 256, the old default, so short text is unchanged.
  • Streaming (--mode streaming) also takes the new default.

🤖 Generated with Claude Code

The default chunk size was the model's text window, max_text_len = 256, applied as 256 characters, but each chunk is generated within max_duration_sec (30 s), about 160 Japanese characters at the model's pace. A longer chunk was squeezed into 30 s and its second half garbled without an error. Use 100 characters, close to the upstream Irodori-TTS-Server's punctuation split after 80 characters; a text window smaller than that still caps it.
@0xShug0
0xShug0 merged commit bd7032c into 0xShug0:main Oct 21, 2026
7 checks passed
@0xShug0

0xShug0 commented Oct 21, 2026

Copy link
Copy Markdown
Owner

@hiroki-abe-58 Merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants