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. Load 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 7 credits. Put one voiceover or one whole dialogue in one call rather than splitting it into many short lines.
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). | |
| 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. |