Skip to main content

MiniMax TTS plugin guide

How to use the MiniMax TTS plugin for LiveKit Agents.

Available in
Python

Overview

This plugin allows you to use MiniMax as a TTS provider for your voice agents.

Quick reference

This section includes a brief overview of the MiniMax TTS plugin. For more information, see Additional resources.

Installation

Install the plugin from PyPI:

pip install "livekit-agents[minimax]~=1.2"

Authentication

The MiniMax plugin requires a MiniMax API key.

Set MINIMAX_API_KEY in your .env file.

Usage

Use MiniMax TTS within an AgentSession or as a standalone speech generator. For example, you can use this TTS in the Voice AI quickstart.

from livekit.plugins import minimax
session = AgentSession(
tts=minimax.TTS(
),
# ... llm, stt, etc.
)

Parameters

This section describes some of the available parameters. See the plugin reference for a complete list of all available parameters.

modelTTSModel | stringOptionalDefault: DEFAULT_MODEL

MiniMax TTS model to use. To learn more, see TTS model options.

voiceTTSVoice | stringOptionalDefault: DEFAULT_VOICE_ID

MiniMax TTS voice to use.

emotionTTSEmotion | stringOptionalDefault: None

Control emotional tone for speech. Valid values are happy, sad, angry, fearful, disgusted, surprised, neutral.

speedfloatOptional

Speech speed where higher values speak faster. Range is 0.5 to 2.0.

pronunciation_dictdict[str, list[str]]Optional

Defines the pronunciation rules for specific characters or symbols. Read more in the MiniMax API documentation.

english_normalizationboolOptional

Set to true to enable text normalization. This feature improves the model's pronunciation of numbers and dates, with a minor tradeoff in latency. Read more in the MiniMax API FAQ.

Additional resources

The following resources provide more information about using MiniMax with LiveKit Agents.