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

# 人声翻版

> 对生成的音频进行人声翻版



## OpenAPI

````yaml openapi/cn/producer.json POST /producer/v1/vocals-swap
openapi: 3.1.0
info:
  title: Producer API DOCS
  version: 1.0.0
  description: TTAPI Producer API 接口服务，目前集成了市场上最为领先的视频大模型sora2。
servers:
  - url: https://api.ttapi.io
security: []
paths:
  /producer/v1/vocals-swap:
    post:
      description: 对生成的音频进行人声翻版
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateRequest2'
      responses:
        '200':
          $ref: '#/components/responses/SuccessResponse'
        '400':
          $ref: '#/components/responses/400Response'
        '401':
          $ref: '#/components/responses/401Response'
      security:
        - CustomApiKey: []
components:
  schemas:
    GenerateRequest2:
      type: object
      properties:
        music_id:
          type: string
          description: 父任务的musicId
        sound_prompt:
          type: string
          description: 音频提示词，sound_prompt与lyrics_text不可同时为空
        lyrics_text:
          type: string
          description: 歌词文本，sound_prompt与lyrics_text不可同时为空
        instrumental:
          type: boolean
          description: 是否生成纯音乐，true 为生成纯音乐，true的情况下会忽略自定义歌词
          default: 'false'
        mv:
          type: string
          default: FUZZ-2.0
          enum:
            - FUZZ-2.0 Pro
            - FUZZ-2.0
            - FUZZ-2.0 Raw
            - FUZZ-1.1 Pro
            - FUZZ-1.0 Pro
            - FUZZ-1.0
            - FUZZ-1.1
            - FUZZ-0.8
            - Lyria 3 preview
          description: 使用模型，支持范围
        title:
          type: string
          description: 标题
        cover_art_url:
          type: string
          description: 封面url
        seed:
          type: string
          description: 随机种子
        lyrics_strength:
          type: number
          description: 歌词强度，表示歌词在音频生成中的影响程度，可选0-1之间
          default: '0.5'
        sound_strength:
          type: number
          description: 音频提示词强度，可选0.2-1之间
          default: '0.5'
        weirdness:
          type: number
          description: 风格奇特度，可选 0-1之间
          default: '0.5'
        is_storage:
          type: boolean
          description: '是否转存  true-转存 false-不转存 '
          default: 'false'
        hook_url:
          type: string
          description: 回调通知地址，当设置此参数，任务成功或者失败降会向该地址发送一个post请求，携带数据与查询任务结果中返回一致
      required:
        - sound_prompt
        - lyrics_text
        - music_id
  responses:
    SuccessResponse:
      description: 请求成功
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: SUCCESS
              message:
                type: string
                example: success
              data:
                type: object
                example:
                  jobId: jobId
            required:
              - status
              - message
              - data
    400Response:
      description: 参数错误
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: FAILED
              message:
                type: string
                example: '"prompt" cannot be empty.'
              data:
                type: object
            required:
              - status
              - message
    401Response:
      description: 授权失败
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: FAILED
              message:
                type: string
                example: Wrong TT-API-KEY or email is not activated.
            required:
              - status
              - message
  securitySchemes:
    CustomApiKey:
      type: apiKey
      in: header
      name: TT-API-KEY
      description: >-
        请前往 <a href='https://dashboard.ttapi.io' target='_blank'>TTAPI 控制台</a>
        获取 API 密钥。

````