API Reference / Endpoints / Speech
Text to dialog
/v1/speech/text-to-dialogGenerate multi-speaker dialogue from structured line inputs.
POST
/v1/speech/text-to-dialogAuth: API keyBilling: Consumes 1 API callBehavior: AsyncScopes: audio:generate
POSTAsyncjsonaudio:generate
When to use it
Use this when you need multiple speakers in one output and each line may target a different voice.
Behavior on success
Returns 202 Accepted with a request_id. Poll the status endpoint or use webhooks.
Integration shape
Authorization model
audio:generate
Request format
json
Polling pattern
Poll status if the route returns processing.
Request
| Field | Type | Required | Description |
|---|---|---|---|
inputs | array | Yes | Lines shaped like { text, voice_id }. |
Example request
POST /v1/speech/text-to-dialog
const response = await fetch('https://prod-backup-backend.wubble.ai/v1/speech/text-to-dialog', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.WUBBLE_API_KEY}`,
'Idempotency-Key': crypto.randomUUID(),
'Content-Type': 'application/json',
},
body: JSON.stringify({
"inputs": [
{
"text": "Welcome back to the show.",
"voice_id": "voice_host"
},
{
"text": "Thanks for having me.",
"voice_id": "voice_guest"
}
]
}),
});
const payload = await response.json();
console.log(payload);Example response
Response shapejson
{
"success": true,
"data": {
"request_id": "<uuid>",
"status": "processing",
"estimated_seconds": 10
}
}Production guidance
Pair this route with idempotency on POST requests and either request polling or webhooks whenever the response is asynchronous.
Was this page helpful?