generate_speech
Convert text into speech audio on your machine, returning a download link or a job id to poll. Handles up to 3000 characters per call.
Instructions
Turn text into speech on this machine with Guaardvark's Audio Foundry. Waits up to about a minute for the file (usually seconds) and returns its name, library document id, length and a download link. A longer read, such as a script near the 3000-character limit or a cold start, answers with a job_id instead: poll get_generation_status with it, and do not call again, since the file lands in the library either way. Up to 3000 characters per call; split longer scripts. Voices: naming a voice (a Kokoro id such as 'af_heart' or 'bm_george') always speaks with Kokoro; with no voice, engine 'auto' uses Chatterbox's single stock voice when Chatterbox is installed and Kokoro's default voice otherwise. Chatterbox has no voice ids, so engine 'chatterbox' with a voice is refused. A model or voice pack that is not installed is refused with a pointer to Audio Studio → Manage models; nothing is downloaded. Needs the Audio Foundry plugin running. Cloning a real person's voice (a Chatterbox reference clip) is not available here; it needs the person to confirm in Audio Studio that they have the right to clone that voice. For a song use generate_music.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | What to say, as it should be spoken (spell out numbers and names the way they sound). | |
| voice | No | A Kokoro voice id: accent and gender prefix plus a name, e.g. 'af_heart' (American female, the default), 'am_michael', 'bf_emma', 'bm_george', 'ef_dora' (Spanish). Naming one selects Kokoro. An unknown id is refused with the full list. Omit for the engine's default voice. | |
| engine | No | 'auto' (default): Kokoro when voice is set; otherwise Chatterbox when it is installed, falling back to Kokoro. 'kokoro': the named voice or af_heart. 'chatterbox': its one stock voice; do not combine with voice. | auto |
| idempotency_key | No | Optional. Send the same key when retrying this call: the retry waits for or returns the first run instead of starting a second one. |