Overview
Convert text to natural-sounding speech using a library of built-in voices, or clone a custom voice from a short audio sample for consistent narration.
Primary Endpoint
/api/v1/userVoice/trainingStart voice training
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Name of the voice model |
| voice_urls | array<string> | Yes | Array of audio file URLs for training |
| gender | enum: female | male | No | Voice gender |
| denoise | boolean | No | Whether to apply denoising |
| enhance_voice_similarity | boolean | No | Whether to enhance voice similarity |
| model | enum: a2e | cartesia | minimax | elevenlabs | No | Voice model to use |
| language | string | No | Language code from client (e.g. en-US, zh-CN). If omitted, server will infer from request headers. |
| webhook_url | string | No | HTTPS URL to receive task.completed / task.failed notifications. Best-effort delivery, single attempt, no retries; clients should treat the detail API as the source of truth. |
| webhook_token | string | No | Optional plaintext token returned in the X-A2e-Webhook-Token header so receivers can verify the request originated from a2e. |
Request Example
curl -X POST "https://www.a2e.com.cn/api/v1/userVoice/training" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "My Custom Voice",
"voice_urls": [
"https://example.com/audio1.wav",
"https://example.com/audio2.wav"
],
"gender": "female",
"denoise": true,
"enhance_voice_similarity": true,
"model": "a2e",
"language": "en-US",
"webhook_url": "https://your-server.example.com/a2e/webhook",
"webhook_token": "a-shared-secret"
}'Related Endpoints
/api/v1/anchor/tts_listList system voices (TTS presets)
/api/v1/anchor/language_listList supported languages/regions for voices
/api/v1/anchor/voice_listList available voices by country/region
/api/v1/anchor/voice_listList available voices (GET)
/api/v1/video/send_ttsGenerate text-to-speech audio
/api/v1/tts/preview/listGet TTS preview list
/api/v1/tts/preview/{id}Delete TTS preview record
/api/v1/userVoice/trainingStart voice training
/api/v1/userVoice/trainingRecordGet voice training records
/api/v1/userVoice/completedRecordGet completed voice training records
/api/v1/userVoice/{_id}Delete voice training record
/api/v1/userVoice/{_id}Get voice training record detail
/api/v1/userVoice/{_id}Update voice training record name
Responses
Voice training record created successfully
Bad Request - Invalid training data
Unauthorized - Invalid or missing bearer token
Forbidden - Voice clone limit exceeded