Skip to content

Fix MOSS-Nano CJK chunking for supplementary ideographs - #1036

Merged
0xShug0 merged 1 commit into
0xShug0:mainfrom
ZeroDot1:zerodot1/moss-cjk-supplementary
Oct 21, 2026
Merged

0xShug0 merged 1 commit into
0xShug0:mainfrom
ZeroDot1:zerodot1/moss-cjk-supplementary

Conversation

@ZeroDot1

Copy link
Copy Markdown
Contributor

Decode validated four-byte UTF-8 characters when selecting the default MOSS-TTS-Nano text chunk size. Supplementary CJK ideographs, including Extensions B and G, now count toward the CJK majority and receive the 50-codepoint budget instead of incorrectly falling back to 256.

Move the heuristic into a small detail helper and add regression coverage for supplementary and BMP CJK text, Latin text, and malformed UTF-8. Register the test only when the MOSS model is linked.

Validation on the Intel Core Ultra 7 265K and AMD Radeon RX 9070 XT (gfx1201, ROCm 7.2.4): Release HIP build of the MOSS model, CLI, and regression test completed; the regression test passed; an actual HIP TTS run with the MOSS-Nano Q8_0 model completed successfully, selected text_chunk_size=50 for Chinese input, stopped at EOC, and wrote a 5.12-second 48 kHz stereo WAV.

The model and build artifacts used for validation were stored under /tmp/audio-cpp-test-models and /tmp/audio-cpp-moss-cjk-build.

Decode validated four-byte UTF-8 characters when selecting the default MOSS-TTS-Nano text chunk size. Supplementary CJK ideographs, including Extensions B and G, now count toward the CJK majority and receive the 50-codepoint budget instead of incorrectly falling back to 256.

Move the heuristic into a small detail helper and add regression coverage for supplementary and BMP CJK text, Latin text, and malformed UTF-8. Register the test only when the MOSS model is linked.

Validation on the Intel Core Ultra 7 265K and AMD Radeon RX 9070 XT (gfx1201, ROCm 7.2.4): Release HIP build of the MOSS model, CLI, and regression test completed; the regression test passed; an actual HIP TTS run with the MOSS-Nano Q8_0 model completed successfully, selected text_chunk_size=50 for Chinese input, stopped at EOC, and wrote a 5.12-second 48 kHz stereo WAV.

The model and build artifacts used for validation were stored under /tmp/audio-cpp-test-models and /tmp/audio-cpp-moss-cjk-build.
@0xShug0
0xShug0 marked this pull request as ready for review October 21, 2026 23:52
@0xShug0
0xShug0 merged commit db433f3 into 0xShug0:main Oct 21, 2026
7 checks passed
@0xShug0

0xShug0 commented Oct 21, 2026

Copy link
Copy Markdown
Owner

@ZeroDot1 Thanks! The fix is narrowly scoped. 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