MiniMaxTTSConfig
Configuration for the MiniMaxTTS provider.
Defined in: src/providers/tts/minimax/MiniMaxTTS.ts:102
Configuration for the MiniMaxTTS provider.
Remarks
Provide either apiKey (for direct API access) or proxyUrl (for server-side proxy). At least one must be set. If both are provided, proxyUrl takes precedence and the API key is not sent to the client. The voiceId is always required.
Example
// Direct API access
const config: MiniMaxTTSConfig = {
apiKey: 'eyJhbGciOi...',
voiceId: 'English_expressive_narrator',
model: 'speech-02-hd',
audioFormat: 'mp3',
};
// Via proxy server
const proxyConfig: MiniMaxTTSConfig = {
proxyUrl: 'http://localhost:3001/api/proxy/minimax',
voiceId: 'English_expressive_narrator',
};
See
- MiniMaxTTSModel - Available model options.
- MiniMaxTTSFormat - Available audio format options.
Extends
Properties
| Property | Type | Default value | Description | Overrides | Inherited from | Defined in |
|---|---|---|---|---|---|---|
apiKey? | string | () => Promise<string> | undefined | API key or authentication token for the provider. Remarks Can be a static string or an async factory function that returns a fresh token on each call. Use a factory for short-lived tokens (e.g. Deepgram JWTs) so each WebSocket connection gets a valid credential. For client-side usage, consider using a proxy server to keep API keys secure. The SDK provides Express, Next.js, and Node adapters for this purpose. | - | TTSProviderConfig.apiKey | src/core/types/providers.ts:71 |
audioFormat? | MiniMaxTTSFormat | 'mp3' | The audio output format. See MiniMaxTTSFormat | - | - | src/providers/tts/minimax/MiniMaxTTS.ts:140 |
authType? | "token" | "bearer" | Provider-specific (typically 'token' for Deepgram, ignored for REST providers) | Authentication type for providers that support multiple auth mechanisms. Remarks Controls how the apiKey is sent to the provider: - 'token' — WebSocket subprotocol ['token', apiKey] or header Authorization: Token <key>. This is the default for Deepgram providers. - 'bearer' — WebSocket subprotocol ['bearer', token] or header Authorization: Bearer <token>. Use this for OAuth tokens or providers that expect Bearer auth. REST/SDK providers (Anthropic, OpenAI) handle auth through their SDK constructors and ignore this field. | - | TTSProviderConfig.authType | src/core/types/providers.ts:115 |
bitrate? | number | undefined (MiniMax default, 128000) | Output bitrate in bits per second (mp3 only). Remarks One of 32000, 64000, 128000, or 256000. | - | - | src/providers/tts/minimax/MiniMaxTTS.ts:160 |
channel? | 1 | 2 | undefined (MiniMax default, 1) | Number of audio channels: 1 (mono) or 2 (stereo). | - | - | src/providers/tts/minimax/MiniMaxTTS.ts:167 |
debug? | boolean | false | Whether to enable debug logging for this provider. Remarks When true, the provider emits detailed internal logs. This is separate from the SDK-level LoggingConfig. | - | TTSProviderConfig.debug | src/core/types/providers.ts:126 |
emotion? | MiniMaxTTSEmotion | undefined (neutral delivery) | Emotion to apply to the synthesized speech. See MiniMaxTTSEmotion | - | - | src/providers/tts/minimax/MiniMaxTTS.ts:196 |
endpoint? | string | undefined | Custom endpoint URL to override the provider’s default API endpoint. Remarks Useful for self-hosted instances, proxy servers, or development environments. | - | TTSProviderConfig.endpoint | src/core/types/providers.ts:79 |
groupId? | string | undefined (no GroupId query parameter) | MiniMax Group ID, appended to the request URL as ?GroupId=<id>. Remarks Older MiniMax API keys are scoped to a group and require this query parameter; newer keys embed the group and work without it. Find your Group ID in the MiniMax platform console under account settings. Omit it if your key authenticates without one. | - | - | src/providers/tts/minimax/MiniMaxTTS.ts:132 |
languageBoost? | string | undefined (no language boost) | Language hint to improve pronunciation for a specific language or dialect. Remarks For example 'English', 'Chinese', 'Japanese', or 'auto' for automatic detection. See the MiniMax T2A docs for the full list. | - | - | src/providers/tts/minimax/MiniMaxTTS.ts:207 |
maxRetries? | number | 3 | Maximum number of retries for failed API requests. | - | - | src/providers/tts/minimax/MiniMaxTTS.ts:225 |
model? | MiniMaxTTSModel | 'speech-02-hd' | The TTS model to use. See MiniMaxTTSModel | TTSProviderConfig.model | - | src/providers/tts/minimax/MiniMaxTTS.ts:119 |
outputFormat? | string | undefined | Output audio format identifier. Remarks Provider-specific format string (e.g., 'linear16', 'mp3', 'opus'). | - | TTSProviderConfig.outputFormat | src/core/types/providers.ts:1190 |
pitch? | number | undefined (MiniMax default, 0) | Voice pitch adjustment in semitones, range [-12, 12]. | TTSProviderConfig.pitch | - | src/providers/tts/minimax/MiniMaxTTS.ts:188 |
pronunciationDict? | { tone: string[]; } | undefined (no custom pronunciations) | Custom pronunciation dictionary. Remarks Each entry in tone replaces a token with an explicit pronunciation, e.g. { tone: ['omg/oh my god'] }. | - | - | src/providers/tts/minimax/MiniMaxTTS.ts:218 |
pronunciationDict.tone | string[] | undefined | - | - | - | src/providers/tts/minimax/MiniMaxTTS.ts:218 |
proxyUrl? | string | undefined | URL of a CompositeVoice proxy server endpoint for this provider. Remarks When set, requests are routed through the proxy which injects the real API key server-side. This keeps API keys out of the browser. For WebSocket providers the HTTP URL is automatically converted to ws(s)://. At least one of apiKey or proxyUrl must be set for providers that require authentication (all except NativeSTT, NativeTTS, and WebLLM). Example proxyUrl: 'http://localhost:3000/api/proxy/deepgram' | - | TTSProviderConfig.proxyUrl | src/core/types/providers.ts:97 |
rate? | number | undefined | Speech rate multiplier. Remarks Values from 0.25 (quarter speed) to 4.0 (quadruple speed), where 1.0 is normal speed. Not all providers support rate adjustment. | - | TTSProviderConfig.rate | src/core/types/providers.ts:1174 |
sampleRate? | number | undefined (MiniMax default, 32000) | Output sample rate in Hz. Remarks One of 8000, 16000, 22050, 24000, 32000, or 44100. | TTSProviderConfig.sampleRate | - | src/providers/tts/minimax/MiniMaxTTS.ts:150 |
speed? | number | undefined (MiniMax default, 1) | Speech speed multiplier, range [0.5, 2]. | - | - | src/providers/tts/minimax/MiniMaxTTS.ts:174 |
timeout? | number | undefined | Request timeout in milliseconds. Remarks Applies to HTTP requests (REST providers) and connection establishment (WebSocket providers). Set to 0 for no timeout. | - | TTSProviderConfig.timeout | src/core/types/providers.ts:135 |
voice? | string | undefined | Voice ID or name to use for synthesis. Remarks Provider-specific voice identifier. For example, Deepgram uses identifiers like 'aura-asteria-en', while ElevenLabs uses voice IDs. | - | TTSProviderConfig.voice | src/core/types/providers.ts:1157 |
voiceId | string | undefined | The voice to use for synthesis. Remarks Required. A MiniMax system voice ID (e.g. 'English_expressive_narrator', 'English_Graceful_Lady') or a cloned voice ID. List available voices via MiniMax’s POST /v1/get_voice endpoint. | - | - | src/providers/tts/minimax/MiniMaxTTS.ts:111 |
volume? | number | undefined (MiniMax default, 1) | Speech volume, range (0, 10]. | - | - | src/providers/tts/minimax/MiniMaxTTS.ts:181 |