Tổng hợp giọng nói
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
Phần tiêu đề “OpenAPI Specification”openapi: 3.0.1info: title: '' description: '' version: 1.0.0paths: /kling/v1/audio/tts: post: summary: Tổng hợp giọng nói deprecated: false description: '' operationId: post-kling-v1-audio-tts tags: - OpenAiHub Việt Nam/OpenAiHub Tiếng Việt/Video/Kling/Tổng hợp giọng nói - 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: - text - voice_id - voice_language properties: text: type: string description: >- Kịch bản cho âm thanh tổng hợp; độ dài tối đa 1000; văn bản quá dài sẽ gây lỗi; hệ thống xác thực nội dung voice_id: type: string description: >- ID giọng nói: có nhiều giọng nói hệ thống, xem bảng ánh xạ hiệu ứng giọng nói / ID / ngôn ngữ; tính năng nghe thử giọng nói không hỗ trợ văn bản tùy chỉnh
tên tệp nghe thử: name#id#language
TTS hiện chỉ hỗ trợ giọng nói chính thức, không hỗ trợ giọng nói tùy chỉnh voice_language: type: string description: >- Kịch bản cho âm thanh tổng hợp; độ dài tối đa 1000; văn bản quá dài sẽ gây lỗi; hệ thống xác thực nội dung voice_speed: type: number description: >- Tốc độ nói 0.8–2.0, 1 chữ số thập phân; các giá trị ngoài phạm vi được làm tròn x-apifox-orders: - text - voice_id - voice_language - voice_speed x-apidog-orders: - text - voice_id - voice_language - voice_speed examples: example: value: text: Mô tả hình ảnh nhìn thấy voice_id: genshin_vindi2 voice_language: zh voice_speed: 1 summary: example responses: '200': description: '' content: application/json: schema: type: object x-apidog-orders: [] examples: example: summary: example value: code: 0 data: task_id: task_example_001 message: thành công 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/Tổng hợp giọng nói x-apidog-status: released x-run-in-apidog: https://app.apidog.com/web/project/1218648/apis/api-45209027-runcomponents: schemas: {} securitySchemes: {}servers: - url: https://api.openaihub.net description: Prod Envsecurity: []