Summary
mmx speech synthesize --pronunciation "<from>/<to>" builds the wrong JSON shape for pronunciation_dict. It serializes it as an array of {tone, text} objects, but the MiniMax T2A API expects an object with a tone string array. Every request that uses --pronunciation therefore fails, so custom pronunciation (e.g. Chinese polyphonic characters / 多音字) is completely unusable from the CLI.
Environment
mmx 1.0.16
- Region:
cn (api.minimaxi.com)
- Model:
speech-2.8-hd
- macOS (darwin)
Steps to reproduce
mmx speech synthesize \
--text "我要去重庆出差。" \
--pronunciation "重/(chong2)" \
--out out.mp3
Actual result
Error: API error: invalid params, Mismatch type open_platform.PronunciationDict with value array "at index 258: mismatched type with value\n\n\tunciation_dict\":[{\"tone\":\"(chong\n\t................^...............\n" (HTTP 200)
Root cause
--dry-run --verbose shows the request body the CLI generates:
"pronunciation_dict": [
{
"tone": "(chong2)",
"text": "重"
}
]
But the T2A API (/v1/t2a_v2) expects pronunciation_dict to be an object whose tone field is an array of word/(pronunciation) strings:
"pronunciation_dict": {
"tone": ["重/(chong2)"]
}
See: https://platform.minimaxi.com/docs/api-reference/speech-t2a-http
So the CLI is:
- Emitting an array instead of an object.
- Splitting
from/to into separate text / tone fields, whereas the API wants the original word/(pronunciation) kept as a single string inside tone.
Confirmed fix (works via raw API)
Sending the corrected body succeeds and produces audio with the overridden pronunciation:
curl -s https://api.minimaxi.com/v1/t2a_v2 \
-H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
-d '{
"model":"speech-2.8-hd",
"text":"我要去重庆出差。",
"voice_setting":{"voice_id":"English_expressive_narrator"},
"audio_setting":{"format":"mp3","sample_rate":32000},
"output_format":"hex",
"pronunciation_dict":{"tone":["重/(chong2)"]}
}'
# -> base_resp.status_code == 0, audio returned OK
Suggested fix
Change the --pronunciation serialization so that each from/to value is joined back into a single from/to string and collected under a tone array on an object:
"pronunciation_dict": { "tone": ["重/(chong2)", "行长/(hang2)(zhang3)"] }
i.e. don't split into {text, tone} and don't wrap in an outer array.
Impact
There is no CLI-level workaround — --pronunciation is the only entry point and its output structure is hard-coded, so custom pronunciation cannot be used at all until this is fixed. This blocks a common use case: correcting Chinese polyphonic characters (多音字) in TTS.
Summary
mmx speech synthesize --pronunciation "<from>/<to>"builds the wrong JSON shape forpronunciation_dict. It serializes it as an array of{tone, text}objects, but the MiniMax T2A API expects an object with atonestring array. Every request that uses--pronunciationtherefore fails, so custom pronunciation (e.g. Chinese polyphonic characters / 多音字) is completely unusable from the CLI.Environment
mmx 1.0.16cn(api.minimaxi.com)speech-2.8-hdSteps to reproduce
Actual result
Root cause
--dry-run --verboseshows the request body the CLI generates:But the T2A API (
/v1/t2a_v2) expectspronunciation_dictto be an object whosetonefield is an array ofword/(pronunciation)strings:See: https://platform.minimaxi.com/docs/api-reference/speech-t2a-http
So the CLI is:
from/tointo separatetext/tonefields, whereas the API wants the originalword/(pronunciation)kept as a single string insidetone.Confirmed fix (works via raw API)
Sending the corrected body succeeds and produces audio with the overridden pronunciation:
Suggested fix
Change the
--pronunciationserialization so that eachfrom/tovalue is joined back into a singlefrom/tostring and collected under atonearray on an object:i.e. don't split into
{text, tone}and don't wrap in an outer array.Impact
There is no CLI-level workaround —
--pronunciationis the only entry point and its output structure is hard-coded, so custom pronunciation cannot be used at all until this is fixed. This blocks a common use case: correcting Chinese polyphonic characters (多音字) in TTS.