Skip to main content

MiniMax TTS plugin guide

How to use the MiniMax TTS plugin for LiveKit Agents.

Available inPython

Overview

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

Installation

Install the plugin from PyPI:

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

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 | stringDefault: speech-02-turbo

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

voiceTTSVoice | stringDefault: socialmedia_female_2_v1

MiniMax TTS voice to use.

emotionTTSEmotion | stringDefault: None

Control emotional tone for speech. Valid values are happy, sad, angry, fearful, disgusted, surprised, neutral, and fluent. Only speech-2.6-* models accept fluent.

speedfloat

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

pronunciation_dictdict[str, list[str]]

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

text_normalizationboolDefault: false

Set to true to enable text normalization. This improves the pronunciation of numbers and dates, but adds a small amount of latency. Read more in the MiniMax API reference .

Additional resources

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