> For the complete documentation index, see [llms.txt](https://docs.clore.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.clore.ai/guides/guides_v2-zh/yin-pin-yu-yu-yin/minimax-speech.md).

# MiniMax Speech 2.6

在 Clore.ai GPU 服务器上部署 MiniMax Speech 2.6——超低延迟语音智能体 TTS

{% hint style="success" %}
**发布日期：** 2026年3月4日——MiniMax 刚刚发布了 Speech 2.6，具备超低延迟、增强的格式处理能力，以及适用于实时语音代理场景的类人化声音。
{% endhint %}

**MiniMax Speech 2.6** 是一款面向实时语音代理应用的最先进文本转语音模型。它具备超低端到端延迟、改进的音频格式处理（MP3、PCM、WAV、FLAC），并且与 Speech 2.x 相比，声音自然得多。最适合通过 API 使用，但也可通过 MiniMax API 集成到自托管流水线中。

### 主要特性

| 功能   | 详情                   |
| ---- | -------------------- |
| 延迟   | 超低（< 300ms TTFB）     |
| 语音质量 | 类人化、自然的韵律            |
| 语言   | 20+ 种语言，包括英语、中文、俄语   |
| 输出格式 | MP3、PCM、WAV、FLAC     |
| 使用场景 | 语音代理、实时 TTS、流式传输     |
| API  | 兼容 OpenAI 的 REST API |

### 为什么选择 MiniMax Speech 2.6？

* **300 毫秒以下延迟** — 适用于实时对话代理
* **支持流式传输** — 逐 token 音频流式传输，实现最低感知延迟
* **声音克隆** — 可通过短音频样本克隆声音
* **可直接用于生产** — 为 MiniMax 自家的商业语音产品提供支持

***

## 设置：在 Clore.ai 上自托管 API 代理

MiniMax Speech 2.6 目前是基于 API 的。你可以在一台小型 Clore.ai 服务器上运行轻量级 FastAPI 代理（即使是仅 CPU 也可以），将其集成到你的流水线中：

```yaml
version: "3.8"
services:
  minimax-proxy:
    image: python:3.11-slim
    ports:
      - "8080:8080"
    environment:
      - MINIMAX_API_KEY=${MINIMAX_API_KEY}
      - MINIMAX_GROUP_ID=${MINIMAX_GROUP_ID}
    volumes:
      - ./app:/app
    command: >
      sh -c "pip install fastapi uvicorn httpx python-dotenv &&
             uvicorn app.main:app --host 0.0.0.0 --port 8080"
```

### 最简 FastAPI 代理（`app/main.py`)

```python
import os, httpx
from fastapi import FastAPI
from fastapi.responses import StreamingResponse
from pydantic import BaseModel

app = FastAPI()

MINIMAX_API_KEY = os.environ["MINIMAX_API_KEY"]
MINIMAX_GROUP_ID = os.environ["MINIMAX_GROUP_ID"]
BASE_URL = "https://api.minimax.io/v1"

class TTSRequest(BaseModel):
    text: str
    voice_id: str = "Calm_Woman"
    speed: float = 1.0
    output_format: str = "mp3"

@app.post("/tts")
async def text_to_speech(req: TTSRequest):
    """代理到 MiniMax Speech 2.6"""
    async with httpx.AsyncClient(timeout=30) as client:
        response = await client.post(
            f"{BASE_URL}/t2a_v2?GroupId={MINIMAX_GROUP_ID}",
            headers={"Authorization": f"Bearer {MINIMAX_API_KEY}"},
            json={
                "model": "speech-02-hd",
                "text": req.text,
                "stream": False,
                "voice_setting": {
                    "voice_id": req.voice_id,
                    "speed": req.speed,
                    "vol": 1.0,
                    "pitch": 0
                },
                "audio_setting": {
                    "sample_rate": 32000,
                    "bitrate": 128000,
                    "format": req.output_format
                }
            }
        )
    data = response.json()
    audio_b64 = data["data"]["audio"]
    import base64
    audio_bytes = base64.b64decode(audio_b64)
    return StreamingResponse(
        iter([audio_bytes]),
        media_type=f"audio/{req.output_format}"
    )

@app.get("/health")
async def health():
    return {"status": "ok", "model": "minimax-speech-2.6"}
```

### 用法

```bash
# 测试 TTS 端点
curl -X POST http://localhost:8080/tts \\
  -H "Content-Type: application/json" \\
  -d '{"text": "你好！这是在 Clore 上运行的 MiniMax Speech 2.6。", "voice_id": "Calm_Woman"}' \\
  --output output.mp3

# 播放结果
ffplay output.mp3
```

***

## 直接 API 使用（无需服务器）

如果你只是在脚本中需要 TTS：

```python
import requests, base64, os

API_KEY = os.environ["MINIMAX_API_KEY"]
GROUP_ID = os.environ["MINIMAX_GROUP_ID"]

def synthesize(text: str, voice_id: str = "Calm_Woman") -> bytes:
    resp = requests.post(
        f"https://api.minimax.io/v1/t2a_v2?GroupId={GROUP_ID}",
        headers={"Authorization": f"Bearer {API_KEY}"},
        json={
            "model": "speech-02-hd",
            "text": text,
            "stream": False,
            "voice_setting": {"voice_id": voice_id, "speed": 1.0, "vol": 1.0, "pitch": 0},
            "audio_setting": {"sample_rate": 32000, "bitrate": 128000, "format": "mp3"}
        }
    )
    return base64.b64decode(resp.json()["data"]["audio"])

audio = synthesize("在 Clore.ai 上运行 AI 工作负载便宜得令人难以置信。")
with open("output.mp3", "wb") as f:
    f.write(audio)
```

***

## 可用的声音 ID

| 声音 ID            | 角色      | 最适合    |
| ---------------- | ------- | ------ |
| `Calm_Woman`     | 平静女声    | 助手、旁白  |
| `Energetic_Man`  | 充满活力的男声 | 营销、新闻  |
| `Gentle_Man`     | 温和男声    | 有声书、教程 |
| `Cute_Girl`      | 年轻女声    | 娱乐     |
| `Deep_Voice_Man` | 低沉男声    | 纪录片    |

***

## Clore.ai 上的 GPU 要求

{% hint style="info" %}
MiniMax Speech 2.6 是一款基于 API 的模型——你无需 GPU 即可使用。一个小型仅 CPU 的 Clore.ai 服务器（每天 $0.10–0.30）就足以运行代理。可与同一服务器上的其他 GPU 工作负载结合，以实现最高效率。
{% endhint %}

| 服务器类型         | 使用场景           | Clore.ai 成本    |
| ------------- | -------------- | -------------- |
| 仅 CPU（2 vCPU） | 代理 + API 网关    | 约 $0.10–0.20/天 |
| RTX 3060      | 代理 + 本地 GPU 任务 | $0.03–0.07/小时  |
| RTX 4090      | 代理 + 重型 GPU 工作 | $0.14–0.42/小时  |

***

## Clore.ai 端口转发

| 端口   | 服务             |
| ---- | -------------- |
| 8080 | FastAPI TTS 代理 |

***

## Clore.ai 上的替代方案

如果你需要 **完全本地** 无需 API 调用的 TTS：

| 模型         | 显存  | 质量    | 速度  | 指南                                                                     |
| ---------- | --- | ----- | --- | ---------------------------------------------------------------------- |
| Kokoro TTS | 4GB | ⭐⭐⭐⭐  | 快   | [Kokoro TTS](/guides/guides_v2-zh/yin-pin-yu-yu-yin/kokoro-tts.md)     |
| F5-TTS     | 8GB | ⭐⭐⭐⭐⭐ | 中等  | [F5-TTS](/guides/guides_v2-zh/yin-pin-yu-yu-yin/f5-tts.md)             |
| Chatterbox | 6GB | ⭐⭐⭐⭐  | 快   | [Chatterbox](/guides/guides_v2-zh/yin-pin-yu-yu-yin/chatterbox-tts.md) |
| Qwen3-TTS  | 8GB | ⭐⭐⭐⭐⭐ | 中等  | [Qwen3-TTS](/guides/guides_v2-zh/yin-pin-yu-yu-yin/qwen3-tts.md)       |
| Kani-TTS-2 | 3GB | ⭐⭐⭐   | 非常快 | [Kani-TTS](/guides/guides_v2-zh/yin-pin-yu-yu-yin/kani-tts.md)         |

***

## 链接

* **MiniMax API 文档：** [platform.minimax.io/docs](https://platform.minimax.io/docs)
* **Speech 2.6 博客文章：** [minimax.io/news/minimax-speech-26](https://www.minimax.io/news/minimax-speech-26)
* **Clore.ai 市场：** [clore.ai/marketplace](https://clore.ai/marketplace)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.clore.ai/guides/guides_v2-zh/yin-pin-yu-yu-yin/minimax-speech.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
