fix(minimax): use global TTS endpoint default and add missing Talk Mode overrides

Switch DEFAULT_MINIMAX_TTS_BASE_URL from api.minimaxi.com (CN) to
api.minimax.io (global) so international API keys work out of the box.
Add vol and pitch to resolveTalkOverrides for parity with resolveTalkConfig.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
gnuduncan 2026-03-31 10:13:08 +02:00 committed by Peter Steinberger
parent 7d7f5d85b4
commit e934211170
No known key found for this signature in database
4 changed files with 6 additions and 4 deletions

View File

@ -157,7 +157,7 @@ Full schema is in [Gateway configuration](/gateway/configuration).
providers: {
minimax: {
apiKey: "minimax_api_key",
baseUrl: "https://api.minimaxi.com",
baseUrl: "https://api.minimax.io",
model: "speech-2.8-hd",
voiceId: "English_expressive_narrator",
speed: 1.0,
@ -262,7 +262,7 @@ Then run:
- `providers.elevenlabs.applyTextNormalization`: `auto|on|off`
- `providers.elevenlabs.languageCode`: 2-letter ISO 639-1 (e.g. `en`, `de`)
- `providers.elevenlabs.seed`: integer `0..4294967295` (best-effort determinism)
- `providers.minimax.baseUrl`: override MiniMax API base URL (default `https://api.minimaxi.com`, env: `MINIMAX_API_HOST`).
- `providers.minimax.baseUrl`: override MiniMax API base URL (default `https://api.minimax.io`, env: `MINIMAX_API_HOST`).
- `providers.minimax.model`: TTS model (default `speech-2.8-hd`, env: `MINIMAX_TTS_MODEL`).
- `providers.minimax.voiceId`: voice identifier (default `English_expressive_narrator`, env: `MINIMAX_TTS_VOICE_ID`).
- `providers.minimax.speed`: playback speed `0.5..2.0` (default 1.0).

View File

@ -56,7 +56,7 @@ describe("buildMinimaxSpeechProvider", () => {
delete process.env.MINIMAX_TTS_MODEL;
delete process.env.MINIMAX_TTS_VOICE_ID;
const config = provider.resolveConfig!({ rawConfig: {}, cfg: {} as never, timeoutMs: 30000 });
expect(config.baseUrl).toBe("https://api.minimaxi.com");
expect(config.baseUrl).toBe("https://api.minimax.io");
expect(config.model).toBe("speech-2.8-hd");
expect(config.voiceId).toBe("English_expressive_narrator");
});

View File

@ -212,6 +212,8 @@ export function buildMinimaxSpeechProvider(): SpeechProviderPlugin {
? {}
: { model: trimToUndefined(params.modelId) }),
...(asNumber(params.speed) == null ? {} : { speed: asNumber(params.speed) }),
...(asNumber(params.vol) == null ? {} : { vol: asNumber(params.vol) }),
...(asNumber(params.pitch) == null ? {} : { pitch: asNumber(params.pitch) }),
}),
listVoices: async () => MINIMAX_TTS_VOICES.map((voice) => ({ id: voice, name: voice })),
isConfigured: ({ providerConfig }) =>

View File

@ -1,4 +1,4 @@
export const DEFAULT_MINIMAX_TTS_BASE_URL = "https://api.minimaxi.com";
export const DEFAULT_MINIMAX_TTS_BASE_URL = "https://api.minimax.io";
export const MINIMAX_TTS_MODELS = ["speech-2.8-hd", "speech-01-240228"] as const;