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

# 音色

音色接口用于创建、列出和查询当前工作区可用的音色。创建音色后，在创建 Streaming Avatar 会话或保存角色时，将返回的 `voice_id` 作为 `pipeline_config.tts_config.tts_voice_id` 传入。

创建音色有两种方式：通过上传的参考音频**克隆音色**，或者根据文本描述**设计音色**。两者都会返回可直接使用的 `voice_id`，并共用同一个 `max_voices` 配额。

克隆音色前，请先将参考音频上传到当前工作区：`POST /v1/files/audios`。

**响应结构。** REST 响应统一封装为 `{code, message, data}`：`code = 0` 表示成功。下方的字段说明均指 `data` 中的字段。

## 端点

| 方法 | 接口 | 功能 |
| - | - | - |
| `POST` | [上传音频](https://docs.vivix.ai/cn/streaming-avatar/api-references/voices/upload-audio.md) | 上传音频文件，并返回用于克隆的 `file_id`。 |
| `POST` | [克隆音色](https://docs.vivix.ai/cn/streaming-avatar/api-references/voices/clone.md) | 使用已上传音频的 `file_id` 克隆音色，并返回 `voice_id`。 |
| `POST` | [设计音色](https://docs.vivix.ai/cn/streaming-avatar/api-references/voices/design.md) | 根据文本描述创建音色，并返回 `voice_id` 和预览音频 URL。 |
| `GET` | [列出音色](https://docs.vivix.ai/cn/streaming-avatar/api-references/voices/list.md) | 列出当前工作区可见的音色：该工作区中创建的克隆或设计音色，以及 Vivix 提供的公共音色。 |
| `GET` | [查询音色](https://docs.vivix.ai/cn/streaming-avatar/api-references/voices/get.md) | 使用 `voice_id` 查询当前工作区可见的单个音色。 |


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