# Voxtral TTS

> **Mistral 的开源权重文本转语音模型：40 亿参数、9 种语言、零样本声音克隆，仅需 3 GB 显存。**

| 规格       | 数值                                     |
| -------- | -------------------------------------- |
| **开发者**  | Mistral AI                             |
| **参数**   | 40 亿                                   |
| **架构**   | 仅解码器 TTS                               |
| **语言**   | 9（英语、法语、德语、西班牙语、印地语、阿拉伯语、葡萄牙语、意大利语、日语） |
| **许可证**  | Apache 2.0（开放权重）                       |
| **显存**   | 约 3 GB（FP16）                           |
| **延迟**   | 10 秒输出仅需 70 毫秒                         |
| **声音克隆** | 基于 3 秒参考音频的零样本克隆                       |
| **发布**   | 2026 年 3 月 26 日                        |

## 为什么选择 Voxtral TTS？

Voxtral TTS 是 Mistral 对 ElevenLabs 和 OpenAI TTS 的开源权重答案。对 Clore.ai 用户的主要优势：

* **可在任何 GPU 上运行** —— 仅需 3 GB 显存，甚至 RTX 3060 也能完美运行
* **没有 API 费用** —— 自托管 = 零边际成本、无限合成
* **数据隐私** —— 音频绝不会离开你的机器
* **零样本克隆** —— 仅用 3 秒参考音频即可克隆任何声音
* **原生支持 9 种语言** —— 包括印地语和阿拉伯语，而这些常常是竞争对手缺失的
* **实时速度** —— 在 RTX 4070+ 上 RTF 为 0.1–0.2×（10 秒片段仅需 1–2 秒）

## Clore.ai 上的 GPU 要求

| GPU           | 显存    | 性能              | Clore.ai 价格 |
| ------------- | ----- | --------------- | ----------- |
| RTX 3060 12GB | 12 GB | ✅ 良好 — 3–4× 实时  | 低至 $0.10/天  |
| RTX 3090 24GB | 24 GB | ✅ 很棒 — 批处理      | 低至 $0.30/天  |
| RTX 4070 12GB | 12 GB | ✅ 优秀 — 5–10× 实时 | 低至 $0.25/天  |
| RTX 4090 24GB | 24 GB | ✅ 过剩 — 亚秒级延迟    | 低至 $0.50/天  |

> **推荐：** RTX 3060 12GB（Clore.ai 上 $0.10/天）是大多数使用场景的最佳选择。Voxtral 只需要 3 GB 显存，因此你可以把它和其他模型一起运行。

## 在 Clore.ai 上快速上手

### 步骤 1：租用 GPU 服务器

1. 前往 [Clore.ai 市场](https://clore.ai/marketplace)
2. 筛选任何 8GB 以上显存的 GPU
3. 选择一个 **Docker** 部署
4. 使用镜像： `pytorch/pytorch:2.4.0-cuda12.4-cudnn9-devel`

### 步骤 2：安装依赖

```bash
# 通过 SSH 或 Jupyter 终端连接
pip install torch torchaudio transformers accelerate

# 安装 Voxtral TTS 包
pip install voxtral-tts

# 或直接使用 HuggingFace
pip install huggingface_hub
huggingface-cli download mistralai/Voxtral-TTS --local-dir ./voxtral-tts
```

### 步骤 3：基础文本转语音

```python
from voxtral import VoxtralTTS

# 初始化模型（自动下载约 6 GB 权重）
model = VoxtralTTS.from_pretrained("mistralai/Voxtral-TTS")
model.to("cuda")

# 基础合成
audio = model.synthesize(
    text="欢迎来到 Clore.ai——去中心化 GPU 市场。",
    language="en"
)
audio.save("output.wav")
print(f"已生成 {audio.duration:.1f} 秒音频")
```

### 步骤 4：零样本声音克隆

```python
# 从 3 秒参考音频克隆声音
audio = model.synthesize(
    text="这是我克隆的声音，在谈论 GPU 计算。",
    reference_audio="reference_speaker.wav",  # 3 秒以上
    language="en"
)
audio.save("cloned_output.wav")
```

### 步骤 5：多语言合成

```python
# 使用 9 种受支持语言进行合成
languages = {
    "en": "Hello, this is Voxtral speaking in English.",
    "fr": "Bonjour, c'est Voxtral qui parle en français.",
    "de": "Hallo, hier spricht Voxtral auf Deutsch.",
    "es": "Hola, Voxtral hablando en español.",
    "hi": "नमस्ते, यह Voxtral हिंदी में बोल रहा है।",
    "ar": "مرحبا، هذا Voxtral يتحدث بالعربية.",
    "pt": "Olá, aqui é o Voxtral falando em português.",
    "it": "Ciao, qui parla Voxtral in italiano.",
    "ja": "こんにちは、Voxtralが日本語で話しています。",
}

for lang, text in languages.items():
    audio = model.synthesize(text=text, language=lang)
    audio.save(f"voxtral_{lang}.wav")
    print(f"[{lang}] 已生成 {audio.duration:.1f} 秒")
```

## 生产级 API 服务器

将 Voxtral 部署为 REST API，以集成到你的应用中：

```python
# server.py — Voxtral TTS 的 FastAPI 封装
from fastapi import FastAPI, UploadFile, File
from fastapi.responses import StreamingResponse
from voxtral import VoxtralTTS
import io
import soundfile as sf

app = FastAPI(title="Voxtral TTS API")
model = VoxtralTTS.from_pretrained("mistralai/Voxtral-TTS").to("cuda")

@app.post("/synthesize")
async def synthesize(
    text: str,
    language: str = "en",
    reference: UploadFile = File(None)
):
    kwargs = {"text": text, "language": language}
    if reference:
        ref_bytes = await reference.read()
        kwargs["reference_audio"] = ref_bytes
    
    audio = model.synthesize(**kwargs)
    
    # 以 WAV 流形式返回
    buffer = io.BytesIO()
    sf.write(buffer, audio.numpy(), samplerate=24000, format="WAV")
    buffer.seek(0)
    
    return StreamingResponse(buffer, media_type="audio/wav")

@app.get("/health")
async def health():
    return {"status": "ok", "model": "voxtral-tts", "languages": 9}
```

```bash
# 运行 API 服务器
pip install fastapi uvicorn python-multipart soundfile
uvicorn server:app --host 0.0.0.0 --port 8000

# 测试它
curl -X POST "http://localhost:8000/synthesize?text=Hello%20world&language=en" \
  --output hello.wav
```

## Docker 部署

```dockerfile
FROM pytorch/pytorch:2.4.0-cuda12.4-cudnn9-devel

WORKDIR /app
RUN pip install voxtral-tts fastapi uvicorn python-multipart soundfile

# 预先下载模型权重
RUN python -c "from voxtral import VoxtralTTS; VoxtralTTS.from_pretrained('mistralai/Voxtral-TTS')"

COPY server.py .
EXPOSE 8000
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "8000"]
```

```bash
# 构建并运行
docker build -t voxtral-tts-api .
docker run --gpus all -p 8000:8000 voxtral-tts-api
```

## Voxtral 与其他 TTS 模型对比

| 功能       | Voxtral TTS  | ElevenLabs | Qwen3-TTS | Kokoro TTS | Fish Speech |
| -------- | ------------ | ---------- | --------- | ---------- | ----------- |
| **开放权重** | ✅ Apache 2.0 | ❌ 仅限 API   | ✅         | ✅          | ✅           |
| **显存**   | 3 GB         | 不适用（云端）    | 8 GB      | 2 GB       | 4 GB        |
| **语言**   | 9            | 30+        | 50+       | 5          | 8           |
| **声音克隆** | 3 秒参考        | 1 秒参考      | 5 秒参考     | ❌          | 10 秒参考      |
| **延迟**   | 70 毫秒        | 约 200 毫秒   | 约 150 毫秒  | 50 毫秒      | 100 毫秒      |
| **质量**   | ⭐⭐⭐⭐⭐        | ⭐⭐⭐⭐⭐      | ⭐⭐⭐⭐      | ⭐⭐⭐⭐       | ⭐⭐⭐⭐        |
| **自托管**  | ✅            | ❌          | ✅         | ✅          | ✅           |

## 大型项目的批处理

```python
import concurrent.futures
from voxtral import VoxtralTTS

model = VoxtralTTS.from_pretrained("mistralai/Voxtral-TTS").to("cuda")

# 处理整章有声书
paragraphs = [
    "第 1 章：开始……",
    "那是一个黑暗而暴风雨肆虐的夜晚……",
    "主角向前迈出一步……",
    # ... 数百个段落
]

def process_paragraph(idx_text):
    idx, text = idx_text
    audio = model.synthesize(text=text, language="en")
    audio.save(f"chapter1_part{idx:04d}.wav")
    return idx

# 顺序处理（受 GPU 限制）
for i, text in enumerate(paragraphs):
    process_paragraph((i, text))
    
print(f"已处理 {len(paragraphs)} 个段落")
```

## 用于实时应用的流式模式

```python
# 面向直播/实时应用的流式合成
async def stream_synthesis(text: str, language: str = "en"):
    """以流式分块生成音频，以实现低延迟播放。"""
    model = VoxtralTTS.from_pretrained("mistralai/Voxtral-TTS").to("cuda")
    
    async for chunk in model.synthesize_stream(
        text=text,
        language=language,
        chunk_size=4096  # 在 24kHz 下每块约 170ms
    ):
        yield chunk.numpy().tobytes()
```

## 故障排除

| 问题             | 解决方案                                         |
| -------------- | -------------------------------------------- |
| 小型 GPU 上出现 OOM | 使用 `model.half()` 进行 FP16（显存减半至约 1.5 GB）     |
| 首次推理较慢         | 正常——模型在首次运行时会编译 CUDA 内核（约 30 秒）              |
| 语言 X 的质量较差     | 确保正确的 `language` 参数；某些语言需要更长的参考音频            |
| 音频伪影           | 增加 `reference_audio` 长度到 5–10 秒，以获得更好的声音克隆效果 |
| 模型下载失败         | 设置 `HF_TOKEN` 环境变量，以访问受限模型                   |

## 成本分析：Clore.ai 上的 Voxtral vs 云端 TTS

| 服务                      | 每月 100 万字符  | 说明                         |
| ----------------------- | ----------- | -------------------------- |
| ElevenLabs Pro          | $99/月       | 包含 50 万字符，超额需付费            |
| OpenAI TTS              | $15/月       | 每 100 万字符 $15              |
| Google Cloud TTS        | $16/月       | 标准语音                       |
| **Clore.ai 上的 Voxtral** | **$3–15/月** | RTX 3060，$0.10–0.50/天，无限字符 |

> **结论：** 在 Clore.ai 上自托管 Voxtral，比云端 TTS API 便宜 6–30 倍，而且没有字符限制，数据隐私也完全可控。

## 延伸阅读

* [HuggingFace 上的 Voxtral TTS](https://huggingface.co/mistralai/Voxtral-TTS)
* [Mistral AI 博客——Voxtral 发布公告](https://mistral.ai/news/voxtral-tts)
* [在 Clore.ai 上比较 TTS 模型](/guides/guides_v2-zh/dui-bi/tts-comparison.md)
* [其他音频与语音指南](/guides/guides_v2-zh/yin-pin-yu-yu-yin/audio-voice.md)

***

*最后更新：2026 年 3 月 30 日*


---

# Agent Instructions: 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:

```
GET https://docs.clore.ai/guides/guides_v2-zh/yin-pin-yu-yu-yin/voxtral-tts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
