Skip to content

语音合成

OpenAPI Specification

yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /kling/v1/audio/tts:
    post:
      summary: 语音合成
      deprecated: false
      description: ''
      tags:
        - 可灵 Kling 平台/语音合成
      parameters:
        - name: Content-Type
          in: header
          description: ''
          required: false
          example: application/json
          schema:
            type: string
        - name: Authorization
          in: header
          description: ''
          required: false
          example: Bearer {{YOUR_API_KEY}}
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                text:
                  type: string
                  description: 合成音频的文案;文本内容最大长度1000,内容过长会返回错误码等信息;系统会校验文本内容,如有问题会返回错误码等信息
                voice_id:
                  type: string
                  description: >-
                    音色ID  系统提供多种音色可供选择,具体音色效果、音色ID、音色语种对应关系;音色试听不支持自定义文案 
                    音色试听文件命名规范:音色名称#音色ID#音色语种   语音合成目前仅支持官方音色哈,不支持自定义音色
                voice_language:
                  type: string
                  description: 合成音频的文案;文本内容最大长度1000,内容过长会返回错误码等信息;系统会校验文本内容,如有问题会返回错误码等信息
                voice_speed:
                  type: integer
                  description: 语速有效范围:0.8~2.0,精确至小数点后1位,超出部分将自动四舍五入
              required:
                - text
                - voice_id
                - voice_language
              x-apifox-orders:
                - text
                - voice_id
                - voice_language
                - voice_speed
            example:
              text: 描述看到的画面
              voice_id: genshin_vindi2
              voice_language: zh
              voice_speed: '1.0'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties: {}
          headers: {}
          x-apifox-name: 成功
      security:
        - bearer: []
      x-apifox-folder: 可灵 Kling 平台/语音合成
      x-apifox-status: testing
      x-run-in-apifox: https://app.apifox.com/web/project/5443236/apis/api-386347843-run
components:
  schemas: {}
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
servers:
  - url: https://www.anyapi.vip
    description: 正式环境
security:
  - bearer: []

AnyAPI — 专业的 AI 接口聚合服务