Generate audio
generate_audioMake a voiceover (kind speech: says text word for word, in a voice from list_models kind=audio or a workspace character's voice), a music track (kind music) or a sound effect (kind sfx) from a description. For a song with words (a children's song, a jingle, lyrics in the user's script), use kind music with model lyria-3-pro and put the lyrics and style in text: it sings them. The default music model is instrumental and picks its own length; for a video, omit duration_seconds, because combine_clips loops and fades music to the video's length. Waits for the file, usually 10-60 seconds, and returns it in the conversation; if it is still rendering, the reply carries a job_id for check_generation. Spends the workspace's Masonry credits; list_models with kind=audio shows the models and their prices. Omit model for Masonry's recommended model for the kind.
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": {
"kind": "<kind>",
"text": "<text>"
},
"name": "generate_audio"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | What to make: speech (a voiceover that says text word for word), music (an instrumental track from a description) or sfx (a sound effect or ambience from a description). | |
| text | Yes | speech: the exact words to say, about 2.5 spoken words per second; short audio tags of up to 4 words like [whispers] or [laughs] are performed; a voice, accent or pace description is refused here: the accent, gender and age pick the voice, tone and pace go in style. music and sfx: a description of the sound, e.g. 'upbeat lofi, warm keys, soft drums' or 'a quick whoosh for a cut'. | |
| model | No | Optional audio model key (list_models with kind=audio). Defaults to Masonry's recommended model for the kind. | |
| style | No | speech only, regional voices: how the line is delivered: tone, emotion and pace, e.g. 'warm, calm bedtime storytelling'. Accent, gender and age come from the voice. | |
| voice | No | speech only: a voice key from list_models with kind=audio (e.g. warm-female-us), or a regional voice for an accent (e.g. castilian-male-warm, mexican-female-warm, brazilian-male-narrator), which runs on its own model automatically. Omit for the character's saved voice, else the default voice. | |
| language | No | speech only: ISO 639-1 code to enforce, e.g. en or es; a regional voice speaks its own language. Omit to detect it from the text. | |
| character | No | speech only: the workspace character who says the line (see list_characters); uses its saved voice unless voice is set. | |
| skill_slug | No | speech with character only: the Masonry template (list_skills) whose cast the character is from. A cast member that is not yet in the workspace is added on first use, free, with its voice. | |
| duration_seconds | No | music and sfx only: length in seconds, within the model's range (list_models with kind=audio). Omit for the model's default; some music models choose their own length and refuse it. |