Configuration options for the MiniMax TTS plugin.

interface TTSOptions {
    apiKey?: string;
    baseUrl?: string;
    bitrate?: number;
    emotion?: TTSEmotion;
    intensity?: number;
    languageBoost?: TTSLanguageBoost;
    model?: string;
    pitch?: number;
    pronunciationDict?: Record<string, string[]>;
    sampleRate?: TTSSampleRate;
    speed?: number;
    textNormalization?: boolean;
    timbre?: number;
    tokenizer?: tokenize.SentenceTokenizer;
    voice?: string;
    vol?: number;
}

Properties

apiKey?: string

API key. Falls back to $MINIMAX_API_KEY.

baseUrl?: string

Base URL of the MiniMax API. Falls back to $MINIMAX_BASE_URL, otherwise DEFAULT_BASE_URL.

bitrate?: number

Output bitrate (ignored for PCM). Kept for API parity.

emotion?: TTSEmotion

Optional emotion override. fluent is only supported by speech-2.6-* models; passing it with a different model throws at construction time.

intensity?: number

Voice strength slider. Range [-100, 100].

languageBoost?: TTSLanguageBoost

Language hint for multilingual performance.

model?: string

MiniMax model name. Defaults to speech-02-turbo.

pitch?: number

Pitch adjustment. Must be in the range [-12, 12].

pronunciationDict?: Record<string, string[]>

Pronunciation dictionary, in the format { "word": ["replacement1", "replacement2"] }.

sampleRate?: TTSSampleRate

Output PCM sample rate. Defaults to 24000.

speed?: number

Playback speed. Must be in the range [0.5, 2.0].

textNormalization?: boolean

Enable Chinese/English text normalization on the server side.

timbre?: number

Voice timbre (nasal/crisp) slider. Range [-100, 100].

Tokenizer used when chunking input text for the WebSocket stream.

voice?: string

MiniMax voice id. Defaults to DEFAULT_VOICE_ID.

vol?: number

Volume. Must be in the range (0, 10].