Skip to content

Ming 3.0 TTS: use the request's language when the language option is unset - #1021

Merged
0xShug0 merged 1 commit into
0xShug0:mainfrom
hiroki-abe-58:ming3-request-language
Oct 21, 2026
Merged

0xShug0 merged 1 commit into
0xShug0:mainfrom
hiroki-abe-58:ming3-request-language

Conversation

@hiroki-abe-58

Copy link
Copy Markdown
Contributor

Summary

Ming 3.0 TTS reads its target language only from the language request option. Two common ways of setting the language never reach it:

  • the server's top-level language field on POST /v1/audio/speech, which is what OpenAI-style clients and the ComfyUI nodes send;
  • the CLI's --language flag.

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 language option, and otherwise the transcript's language, as Sopro-TTS does. An explicit option still takes precedence. The spec and docs describe the fallback.

Validation

  • Windows 11, RTX 5090, CUDA build of this branch (.\scripts\build_windows.ps1 -Preset windows-cuda-release -Target audiocpp_cli, and again with -Target audiocpp_server, -CudaArchitectures 120a-real).
  • Model: audio-cpp/Ming-3.0-TTS-0.5B-GGUF@2eb8d37, ming-3.0-tts-0.5b-bf16.gguf.
  • Text: a 141-character Japanese paragraph, which is a single chunk.
  • CER: Whisper large-v3-turbo with sequential long-form decoding, against the input text.
how the language is given seed 1 seed 2
not given (main's result for --language and the server field) 0.150 0.248
CLI --language ja 0.015 0.015
CLI --request-option language=ja 0.015 0.015
server {"language": "ja"} 0.015 0.015
server {"options": {"language": "ja"}} 0.015 0.015

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

…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.
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