Repository navigation
Ming 3.0 TTS: use the request's language when the language option is unset - #1021
Merged
Merged
Conversation
…is unset The server's /v1/audio/speech puts its top-level language field, and the CLI's --language, into the request transcript, not into the options, so Ming ignored both and read Japanese kanji as Chinese. Fall back to the transcript's language, as other TTS sessions do.
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.
Summary
Ming 3.0 TTS reads its target language only from the
languagerequest option. Two common ways of setting the language never reach it:languagefield onPOST /v1/audio/speech, which is what OpenAI-style clients and the ComfyUI nodes send;--languageflag.Both go into the request transcript instead of the options. The model then gets no target language, so it reads Japanese kanji with Chinese pronunciations: 本屋 comes out as "bon'u" and 店 as "ten" in the transcripts.
The session now uses the
languageoption, and otherwise the transcript's language, as Sopro-TTS does. An explicit option still takes precedence. The spec and docs describe the fallback.Validation
.\scripts\build_windows.ps1 -Preset windows-cuda-release -Target audiocpp_cli, and again with-Target audiocpp_server,-CudaArchitectures 120a-real).audio-cpp/Ming-3.0-TTS-0.5B-GGUF@2eb8d37,ming-3.0-tts-0.5b-bf16.gguf.--languageand the server field)--language ja--request-option language=ja{"language": "ja"}{"options": {"language": "ja"}}With this change, the CLI flag and the server field produce PCM byte-identical to the explicit option, for both seeds. Without a language, the audio is also 2–5 s longer (20.1–20.3 s against 15.7–18.0 s).
This touches the same three files as #1020, on different lines; the two branches merge onto main together without conflicts.
🤖 Generated with Claude Code