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

# 从样本音频克隆音色（同步）

> 用参考录音克隆音色。接口是同步的，克隆完成才返回，可能需要几十秒，请把客户端超时设得宽松些（例如 120 秒）。音色保存到网站**我的音色**，返回 `cv_*`，可用于 `voiceSpeakers.selectedVoicesList`。`sampleLanguage` 默认 `en-US`；不传 `provider` 时自动选择克隆引擎。需要套餐包含声音克隆权益（否则返回 `403`）。



## OpenAPI

````yaml /zh/api-reference/app-synced.json post /openapi/v1/app/task/clone-voice/create
openapi: 3.1.0
info:
  title: VMEG 开放 API（应用同源版）
  description: >-
    与独立版协议一致，但任务、素材、克隆音色都在你的 VMEG 网站账号里：任务出现在**我的任务**，可在编辑器继续编辑并重新导出。结果通过轮询 `GET
    /openapi/v1/app/tasks/detail` 获取（无
    Webhook）。见[独立版与应用同源版](/zh/guides/choose-api)。


    文中链接的指南按独立版编写，步骤相同，把路径前缀 `/openapi/v1` 换成 `/openapi/v1/app` 即可。
  version: 1.0.0
servers:
  - url: https://api.vmeg.ai
    description: 生产环境
security:
  - apiKeyAuth: []
tags:
  - name: 媒体翻译
    x-group: 视频与音频翻译配音
    description: >-
      在与 vmeg.ai 相同的链路上翻译配音已上传的视频/音频或 YouTube
      链接。首轮即产出配音成片，任务同时出现在**我的任务**，可继续编辑并重新导出。结果请轮询[查询任务状态](/zh/api-reference/app-synced/tasks/get-task-detail)。
  - name: 声音克隆
    x-group: 声音克隆
    description: 用一段短录音克隆音色。音色保存到网站**我的音色**，返回 `cv_*`，可用于翻译配音任务。
  - name: 任务管理
    x-group: 任务状态与历史
    description: 列出、查看或删除你 VMEG 账号下的视频/音频翻译任务，包括在网站创建的任务。
  - name: 资产 - 素材
    x-group: 上传文件（素材）
    description: 上传并管理网站素材库（**我的资产**）里的文件。完成上传（单文件或分片）后，把 `materialId` 传给 create-async。
  - name: 资产 - 音色
    x-group: 音色（预设与克隆）
    description: 列出系统预设音色（`sv_*`），管理你的克隆音色（`cv_*`，与网站**我的音色**相同）。
paths:
  /openapi/v1/app/task/clone-voice/create:
    post:
      tags:
        - 声音克隆
      summary: 从样本音频克隆音色（同步）
      description: >-
        用参考录音克隆音色。接口是同步的，克隆完成才返回，可能需要几十秒，请把客户端超时设得宽松些（例如 120
        秒）。音色保存到网站**我的音色**，返回 `cv_*`，可用于
        `voiceSpeakers.selectedVoicesList`。`sampleLanguage` 默认 `en-US`；不传
        `provider` 时自动选择克隆引擎。需要套餐包含声音克隆权益（否则返回 `403`）。
      operationId: appCloneVoiceCreateSync
      parameters:
        - $ref: '#/components/parameters/IdempotencyKeyRequired'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AppCloneVoiceCreateRequest'
      responses:
        '200':
          description: 成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppCloneVoiceCreateResponse'
components:
  parameters:
    IdempotencyKeyRequired:
      name: X-Idempotency-Key
      in: header
      required: true
      description: 创建任务或修改持久化数据的 `POST` 必填（最长 64 字符）。见 [幂等](/zh/guides/idempotency)。
      schema:
        type: string
        maxLength: 64
  schemas:
    AppCloneVoiceCreateRequest:
      type: object
      properties:
        voiceName:
          type: string
          description: 克隆音色在资产库中的展示名称
        provider:
          type: string
          enum:
            - V1
            - V2
            - V3
            - V4
            - V5
          example: V1
          description: 克隆引擎（`V1`–`V5`）。见 [支持的克隆方式](/zh/guides/supported-clone-methods)。
        refAudio:
          type: string
          description: HTTPS 参考音频地址（已上传的文件请用 `refAudioMaterialId`），两者二选一。
        sampleLanguage:
          type: string
          example: zh-CN
          description: 样本语言 locale（BCP-47）。见 [支持的语言](/zh/guides/supported-languages)。
        sampleText:
          type: string
          description: 参考音频对应的文本（必填）
        refAudioMaterialId:
          type: string
          description: 已上传音频/视频的素材 ID
      required:
        - voiceName
        - sampleText
    AppCloneVoiceCreateResponse:
      allOf:
        - $ref: '#/components/schemas/OpenApiResponseBase'
        - type: object
          properties:
            data:
              $ref: '#/components/schemas/OpenApiCloneVoiceDto'
    OpenApiResponseBase:
      type: object
      properties:
        code:
          type: integer
          example: 200
          description: 业务码；200 表示成功
        message:
          type: string
          example: ''
          description: 当 `code` 非成功时的说明信息
      required:
        - code
    OpenApiCloneVoiceDto:
      type: object
      properties:
        voiceId:
          type: string
          description: 克隆音色 ID。见 [音色](/zh/guides/app-synced/overview)
        name:
          type: string
          description: Display name of the clone
        provider:
          type: string
          description: 克隆引擎（`V1`–`V5`）。见 [支持的克隆方式](/zh/guides/supported-clone-methods)。
        exampleLanguage:
          type: string
          description: 样本语言 locale（BCP-47）
        content:
          type: string
          description: 与克隆关联的样本文本或转写
        audio:
          type: string
          description: 样本或参考音频 URL
        createTime:
          type: string
          description: 记录创建时间
        updateTime:
          type: string
          description: 记录最近更新时间
  securitySchemes:
    apiKeyAuth:
      type: http
      scheme: bearer
      description: >-
        在 **`Authorization`** 请求头中传入 API Key（`Bearer <api_key>`）。见
        [鉴权](/zh/guides/authentication)。

````