Generate speech
generate_speechGenerate a voiceover: pick a voice that fits the character. Standard voice: Kore. The text is read word for word in any language it is written in. style directs the delivery in plain words; speakers turns "Name: line" text into a dialogue with a voice per speaker. Read builtin-voiceover first: it lists the tags for laughs, sighs, whispers, shouts and pauses, and a tag not on that list is dropped. It answers at once with a Job ID and the media is made in the background: start every generation you need, keep working, then call wait_for_jobs with all their Job IDs to get each Asset ID for patch_film. transcribe_asset gives its word times. Uses credits by the character: 1,000 characters use 9 credits. Put one voiceover or one whole dialogue in one call rather than splitting it into many short lines. To speak in the voice of a person in the user's footage (their own voice saying new words, a line in another language, a voice for a talking photo with lip_sync), pass voiceAssetId with a stretch of 3 to 15 seconds where only that person speaks: the voice is cloned from it, and tags, style and speakers do not apply. A cloned voice uses 10 credits a call.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"text": "<text>",
"voice": "<voice>",
"style": "<style>",
"speakers": "<speakers>",
"voiceAssetId": "<voiceAssetId>",
"voiceStartSeconds": "<voiceStartSeconds>",
"voiceEndSeconds": "<voiceEndSeconds>",
"language": "<language>",
"projectId": "<projectId>"
},
"name": "generate_speech"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| style | Yes | How to say the whole take, in plain words: "a terrified, urgent whisper", "a deep, slow nature-documentary narrator", "a football commentator who screams the goal". It is never spoken. Give every take one; null is a flat read. | |
| voice | Yes | Voice for the call, or for lines without a speaker name in a dialogue. Female: Kore (firm), Zephyr (bright), Leda (youthful), Aoede (breezy), Callirrhoe (easy-going), Autonoe (bright), Despina (smooth), Erinome (clear), Laomedeia (upbeat), Achernar (soft), Gacrux (mature), Pulcherrima (forward), Vindemiatrix (gentle), Sulafat (warm). Male: Charon (informative), Puck (upbeat), Fenrir (excitable), Orus (firm), Enceladus (breathy), Iapetus (clear), Umbriel (easy-going), Algieba (smooth), Algenib (gravelly), Rasalgethi (informative), Alnilam (firm), Schedar (even), Achird (friendly), Zubenelgenubi (casual), Sadachbia (lively), Sadaltager (knowledgeable). With voiceAssetId the person's own voice speaks instead. | |
| language | Yes | With voiceAssetId: the language text is written in, so numbers and abbreviations are read in it: en_us (English (US)), en_gb (English (UK)), fr_fr (French), de (German), es (Spanish), it (Italian), pt_br (Portuguese (Brazil)), ja (Japanese), cmn (Mandarin Chinese), ko (Korean). The cloned voice speaks it whatever language the stretch is in. null is en_us. Without voiceAssetId it is not used: the stock voices read the text in any language. | |
| speakers | Yes | For a dialogue: each speaker's name and voice, with every line of text written as "Name: words". Each turn is spoken in its speaker's voice and the turns are joined into one audio asset. null for one voice. | |
| projectId | Yes | The project this call runs on without changing the open project. null (or leaving it out) uses the open project. wait_for_jobs takes the projectId of the calls that started the jobs. | |
| voiceAssetId | Yes | A video or sound asset in which the person whose voice to speak in talks: the speech is then in that person's own voice, cloned from their speech, instead of voice. Give voiceStartSeconds and voiceEndSeconds with a stretch of 3 to 15 seconds where only that person speaks, clearly, with no music under it: read_transcript gives the times. With it, style and speakers are null, and text is at most 600 characters. null speaks in voice. | |
| voiceEndSeconds | Yes | Source second of voiceAssetId where the stretch ends. | |
| voiceStartSeconds | Yes | Source second of voiceAssetId where the stretch of that person speaking starts, with voiceEndSeconds. null for both uses the whole asset, which is then 3 to 15 seconds long. |