> ## 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.

# 查询音色

> 通过 `voice_id` 查询当前工作区可见的音色，无论该音色是克隆还是设计生成。返回结构与克隆音色接口相同。

> [accordion] 更多详情
>
> 如需使用内置音色，请参阅[选择音色](https://docs.vivix.ai/cn/streaming-avatar/character/voice.md)。

> [accordion] 错误
>
> 错误响应使用相同的 `{code, message, data}` 封装；非零 `code` 表示具体错误。
>
> | 情况 | 错误码 |
> | - | - |
> | 音色不存在，或当前工作区不可见 | `20005 not found` |


## OpenAPI

````yaml cn/streaming-avatar/api-references/openapi.json GET /v1/voices/{voice_id}
openapi: 3.1.0
info:
  title: Vivix Streaming Avatar API 中文参考
  version: 1.0.0
  description: Streaming Avatar 会话、音色和角色的 REST 接口。
servers:
  - url: https://api.vivix.ai
security:
  - bearerAuth: []
paths:
  /v1/voices/{voice_id}:
    get:
      summary: 查询音色
      description: 通过 `voice_id` 查询当前工作区可见的音色，无论该音色是克隆还是设计生成。返回结构与克隆音色接口相同。
      operationId: getVoice
      parameters:
        - name: voice_id
          in: path
          required: true
          schema:
            type: string
          description: 克隆音色、设计音色或列出音色接口返回的 `voice_id`。
          example: voice_9f1c2a7b
      responses:
        '200':
          description: 成功
          content:
            application/json:
              schema:
                type: object
                required:
                  - code
                  - message
                  - data
                properties:
                  code:
                    type: integer
                    description: 成功时为 `0`；其他值均为错误码。
                  message:
                    type: string
                    description: '`success`，或英文错误说明。'
                  data:
                    type: object
                    properties:
                      voice_id:
                        type: string
                        description: 音色 ID（格式类似 `voice_…`）。请原样作为 `tts_voice_id` 传入。
                      name:
                        type: string
                        description: 显示名称。
                      language:
                        type: string
                        description: 创建时传入的语言；省略时为空字符串。
                    required:
                      - voice_id
                      - name
                      - language
              example:
                code: 0
                message: success
                data:
                  voice_id: voice_9f1c2a7b
                  name: Studio Host
                  language: zh
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 你的 Vivix API 密钥。请仅保存在服务端。

````

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