Synthesize a multi-speaker dialogue
Changed onSynthesizes an ordered list of turns (1–50), each with its own voice and emotion, into a single concatenated WAV. Tokens are deducted upfront, billed by the submitted character count (minimum 50, × the AI surcharge only when you opt in with aiRefine: true), and refunded if synthesis fails. With aiRefine: true the dialogue is moderated and each turn is AI-normalized (formulas, acronyms, mixed English), billed with the surcharge; by default (false) turns are synthesized as provided — no content check, no normalization, no surcharge. Pass engine to choose the TTS engine (each is billed at its own multiplier); omit it for the configured default, which GET /v1/engines reports as isDefault. Every turn’s voice must belong to the engine that runs. Returns a presigned audioUrl.
Request
- Base URLhttps://api.vieneu.io
- Auth
- API key in header X-API-Key
- or HTTP bearer
Request body
Example request
{
"turns": [
{
"speaker": "Host",
"voiceId": "Ngọc Lan",
"text": "Xin chào, hôm nay bạn thế nào?",
"emotion": "natural"
}
],
"pauseBetweenTurnsMs": 500,
"temperature": 1,
"applyPronunciation": true,
"engine": "v4"
}Response
The concatenated dialogue, as a presigned WAV URL.
Example response
{
"success": true,
"turnsCount": 4,
"speakers": [
"Host",
"Guest"
],
"audioUrl": "https://s3.amazonaws.com/bucket/dialogue/job.wav?X-Amz-Expires=3600&...",
"audioUrlExpiresIn": 3600,
"duration": 12.4,
"tokenCost": 120
}Changes
- info
added the new optional request property
- info
- breaking
removed the enum value
v3of the request property
- breaking