Repository navigation
Chunk Chinese and Korean text for MagpieTTS at 60 codepoints by default - #1043
Merged
Merged
Conversation
Each text segment is generated within max_tokens, 500 frames or about 23 s, but a 300-codepoint chunk of Chinese or Korean needs about a minute of speech, so the end of every long chunk was cut without an error. NeMo speaks long text of these languages one sentence at a time; use 60 codepoints for zh and ko. Other languages keep 300, and an explicit text_chunk_size is kept as before, including from session preparation.
Owner
|
@hiroki-abe-58 Merged! Thanks. |
Contributor
Author
|
Updated to 100 codepoints (60c8b37) after edge-case tests: 60 also split short mixed text (a Chinese sentence followed by an English one) and the English part came out unintelligible (CER 0.743 vs 0 on main). 100 keeps that text whole and still fixes the long Chinese/Korean cases; numbers are in the description. |
Contributor
Author
|
This merged before my update, so main has 60; the 100 change is in #1044. |
Owner
|
1044 merged! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MagpieTTS generates each text segment within
max_tokens, 500 frames or about 23 s. The default 300-codepoint chunk fits that for English, but 300 codepoints of Chinese or Korean need about a minute of speech. The end of every long chunk is cut without an error: a 219-character Chinese text comes out as 22–23 s of audio.NeMo doesn't send chunks that long.
chunk_text_for_inferencesplits text into sentences, one per chunk, once it passes a per-language threshold of about 20 s of audio (100 characters forzh).This PR makes the default 60 codepoints for
zhandko; other languages keep 300.text_chunk_sizebecomes optional in the generation options and is resolved in the tokenizer, where the language is known. An explicit value, including one from session preparation, is kept as before.Measurements
RTX 5090, Windows 11, CUDA build (
120a-real),magpie-tts-multilingual-357m-q8_0.gguf, default voice (Aria). CER is from Whisper large-v3-turbo with sequential long-form decoding.Other voices on the 415-character Chinese and the Korean text:
Other chunk sizes over seeds 1–6 on the 415-character Chinese text:
Byte checks:
--text-chunk-size 60forzhandko, across three voices.--text-chunk-size 300on Chinese is identical to main's default.🤖 Generated with Claude Code