> ## Documentation Index
> Fetch the complete documentation index at: https://ppio.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# MiniMax Speech

官方文档参考：

* 语音识别：[MiniMax - 语音识别 API 参考](https://platform.minimax.cn/docs/api-reference/speech-to-text)
* 同步语音合成：[MiniMax - 同步语音合成 API 参考](https://platform.minimax.cn/docs/api-reference/speech-t2a-http)
* 异步语音合成：[MiniMax - 异步语音合成 API 参考](https://platform.minimax.cn/docs/api-reference/speech-t2a-async-create)
* 音色复刻：[MiniMax - 音色快速复刻 API 参考](https://platform.minimax.cn/docs/api-reference/voice-cloning-clone)
* 音色设计：[MiniMax - 音色设计 API 参考](https://platform.minimax.cn/docs/api-reference/voice-design-design)

参数及使用方式已对齐官方，详细参数可直接参考官方文档。

## 一、支持模型

| 模型 | 说明 |
| - | - |
| MiniMax Speech to Text | 实际调用名称参考官方文档 |
| MiniMax Speech 2.8 hd | 实际调用名称参考官方文档 |
| MiniMax Speech 2.8 turbo | 实际调用名称参考官方文档 |

## 二、语音生成 API

### 语音识别

```
POST https://{api_domain}/v3/minimax/v1/speech_to_text
```

```bash theme={null}
curl -X POST 'https://{api_domain}/v3/minimax/v1/speech_to_text' \
  -H 'Authorization: Bearer <YOUR_API_KEY>' \
  -H 'language: en' \
  -F 'model=asr-1.0' \
  -F 'response_format=verbose_json' \
  -F 'file=@meeting.mp3'
```

### 同步语音合成

```
POST https://{api_domain}/v3/minimax/v1/t2a_v2
```

```bash theme={null}
curl -X POST 'https://{api_domain}/v3/minimax/v1/t2a_v2' \
  -H 'Authorization: Bearer <YOUR_API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "speech-2.8-hd",
    "text": "Welcome to our service.",
    "stream": false,
    "voice_setting": {
      "voice_id": "male-qn-qingse",
      "speed": 1,
      "vol": 1,
      "pitch": 0
    },
    "audio_setting": {
      "sample_rate": 32000,
      "bitrate": 128000,
      "format": "mp3",
      "channel": 1
    },
    "output_format": "url"
  }'
```

### 异步长文本语音合成：

#### 创建任务

```
POST https://{api_domain}/v3/minimax/v1/t2a_async_v2
```

```bash theme={null}
curl -X POST 'https://{api_domain}/v3/minimax/v1/t2a_async_v2' \
  -H 'Authorization: Bearer <YOUR_API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "speech-2.8-turbo",
    "text": "A longer narration.",
    "voice_setting": {
      "voice_id": "audiobook_male_1",
      "speed": 1,
      "vol": 1,
      "pitch": 0
    }
  }'
```

#### 查询任务

```
GET https://{api_domain}/v3/minimax/v1/query/t2a_async_query_v2?task_id={task_id}
```

```bash theme={null}
curl -X GET 'https://{api_domain}/v3/minimax/v1/query/t2a_async_query_v2?task_id=95157322514444' \
  -H 'Authorization: Bearer <YOUR_API_KEY>'
```

### 文件管理：

#### 上传文件：

```
POST https://{api_domain}/v3/minimax/v1/files/upload
```

```bash theme={null}
curl -X POST 'https://{api_domain}/v3/minimax/v1/files/upload' \
  -H 'Authorization: Bearer <YOUR_API_KEY>' \
  -F 'purpose=voice_clone' \
  -F 'file=@voice.wav'
```

#### 查询文件：

```
GET https://{api_domain}/v3/minimax/v1/files/retrieve?file_id={file_id}
```

```bash theme={null}
curl -X GET 'https://{api_domain}/v3/minimax/v1/files/retrieve?file_id=95157322514496' \
  -H 'Authorization: Bearer <YOUR_API_KEY>'
```

#### 下载文件：

```
GET https://{api_domain}/v3/minimax/v1/files/retrieve_content?file_id={file_id}
```

```bash theme={null}
curl -X GET 'https://{api_domain}/v3/minimax/v1/files/retrieve_content?file_id=95157322514496' \
  -H 'Authorization: Bearer <YOUR_API_KEY>' \
  --output result.mp3
```

### 音色复刻：

```
POST https://{api_domain}/v3/minimax/v1/voice_clone
```

```bash theme={null}
curl -X POST 'https://{api_domain}/v3/minimax/v1/voice_clone' \
  -H 'Authorization: Bearer <YOUR_API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "file_id": 123456789,
    "voice_id": "MyVoice001",
    "need_noise_reduction": false,
    "need_volume_normalization": false
  }'
```

### 音色设计：

```
POST https://{api_domain}/v3/minimax/v1/voice_design
```

```bash theme={null}
curl -X POST 'https://{api_domain}/v3/minimax/v1/voice_design' \
  -H 'Authorization: Bearer <YOUR_API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "prompt": "A warm, clear adult narrator with a calm delivery.",
    "preview_text": "Welcome to our service."
  }'
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.