# "Âm thanh tùy chỉnh"

Nguồn: https://docs.openaihub.net/api-45209033/

> API origin: `https://api.openaihub.net`. Chọn đúng nhóm API và model. Thông số dưới đây là bản tham chiếu kỹ thuật; chưa phải kết quả kiểm thử từng endpoint bằng tài khoản của bạn.


## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /kling/v1/general/custom-voices:
    post:
      summary: Âm thanh tùy chỉnh
      deprecated: false
      description: ''
      operationId: post-kling-v1-general-custom-voices
      tags:
        - OpenAiHub Việt Nam/OpenAiHub Tiếng Việt/Video/Kling/Âm thanh tùy chỉnh
        - kling
      parameters:
        - name: Content-Type
          in: header
          description: Content-Type của phần thân yêu cầu, thường là application/json
          required: false
          example: application/json
          schema:
            type: string
        - name: Authorization
          in: header
          description: Khóa API Bearer
          required: false
          example: Bearer {{YOUR_API_KEY}}
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - voice_name
              properties:
                callback_url:
                  type: string
                  description: URL gọi lại được kích hoạt khi tác vụ hoàn tất
                external_task_id:
                  type: string
                  description: >-
                    Mã định danh tác vụ bên ngoài tùy chỉnh để đối chiếu phía
                    nghiệp vụ
                video_id:
                  type: string
                  description: >-
                    ID công việc trước đây, cung cấp âm thanh thông qua các
                    video công việc trước đây. Chỉ những video đáp ứng các điều
                    kiện sau mới có thể tùy chỉnh giọng nói: video từ V2.6 với
                    sound=on

                    video từ API người kỹ thuật số

                    video từ API đồng bộ khẩu hình

                    âm thanh phải có lời nói rõ ràng, không có tạp âm, chỉ có
                    đúng một giọng nói rõ ràng, thời lượng từ 5 giây đến 30 giây
                voice_name:
                  type: string
                  description: Tên giọng nói
                voice_url:
                  type: string
                  description: >-
                    URL của tệp giọng nói mẫu

                    hỗ trợ các tệp âm thanh/video .mp3/.wav/.mp4/.mov

                    âm thanh phải có lời nói rõ ràng, không có tiếng ồn, chỉ có
                    đúng một giọng nói rõ ràng, thời lượng từ 5 giây đến 30 giây
              x-apifox-orders:
                - callback_url
                - external_task_id
                - video_id
                - voice_name
                - voice_url
              x-apidog-orders:
                - callback_url
                - external_task_id
                - video_id
                - voice_name
                - voice_url
            examples: {}
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                x-apidog-orders: []
              examples:
                example:
                  summary: example
                  value:
                    callback_url: ''
                    external_task_id: ''
                    video_id: '830460928805724256'
                    voice_name: Kiểm tra âm sắc
                    voice_url: ''
          headers: {}
          x-apidog-name: ''
        '400':
          description: Yêu cầu không hợp lệ hoặc xác thực thất bại
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - message
                      - type
                    properties:
                      message:
                        type: string
                        description: Thông báo lỗi (thường kết thúc bằng mã yêu cầu)
                      type:
                        type: string
                        description: Loại lỗi; các lỗi cổng cục bộ thường là new_api_error
                        examples:
                          - new_api_error
                    x-apifox-orders:
                      - message
                      - type
                    x-apidog-orders:
                      - message
                      - type
                refName: NewApiError
                x-apifox-orders:
                  - error
                x-apidog-orders:
                  - error
              examples:
                example:
                  summary: example
                  value:
                    error:
                      message: >-
                        Yêu cầu không hợp lệ (mã yêu cầu:
                        20260805120000123456789AbCdEfGh)
                      type: new_api_error
          headers: {}
          x-apidog-name: Yêu cầu không hợp lệ hoặc xác thực thất bại
        '401':
          description: Khóa API bị thiếu hoặc không hợp lệ
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - message
                      - type
                    properties:
                      message:
                        type: string
                        description: Thông báo lỗi (thường kết thúc bằng mã yêu cầu)
                      type:
                        type: string
                        description: Loại lỗi; các lỗi cổng cục bộ thường là new_api_error
                        examples:
                          - new_api_error
                    x-apifox-orders:
                      - message
                      - type
                    x-apidog-orders:
                      - message
                      - type
                refName: NewApiError
                x-apifox-orders:
                  - error
                x-apidog-orders:
                  - error
              examples:
                example:
                  summary: example
                  value:
                    error:
                      message: >-
                        Mã thông báo không hợp lệ (request id:
                        20260805120000123456789AbCdEfGh)
                      type: new_api_error
          headers: {}
          x-apidog-name: Khóa API bị thiếu hoặc không hợp lệ
      security: []
      x-apidog-folder: OpenAiHub Việt Nam/OpenAiHub Tiếng Việt/Video/Kling/Âm thanh tùy chỉnh
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/1218648/apis/api-45209033-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://api.openaihub.net
    description: Prod Env
security: []

```
