Generate Sound
lab_sfxGenerate or CLEAN UP a SOUND track other than music — sound effects, ambience/atmosphere, dialog, a voiceover, FOLEY scored to an existing clip, or the repair kinds that take an EXISTING recording apart instead of inventing one: denoise (take the noise out), split (separate it into stems), isolation (keep the voice, drop the rest). All of it goes through the same audio pipeline as lab_generate_music. ASYNCHRONOUS: the call returns immediately with a row whose audio_url is null and metadata.status is 'pending'. Nothing is playable yet. Poll lab_list_audio (matching audio_type) until that row's status is 'completed' and audio_url is set; a failed row refunds its credits and carries metadata.error. The backend picks the provider for the chosen art on its own — there is no tool parameter here.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| art | Yes | Kind of track — sfx (a single sound effect), ambience (a continuous atmosphere/soundscape), dialog (a spoken line), voiceover (narration), foley (sound derived FROM an existing clip and synced to what happens in it — needs `video_id`, ignores `duration_seconds`, and takes its length from the source). The repair kinds work on a recording you already have and need exactly one source (`audio_id`, `video_id` or `audio_url`), never a prompt: denoise (take out hiss, hum and room noise), split (separate the recording into stems — one audio row per stem), isolation (keep only the voice, drop room, noise and music). Their length follows the source, so `duration_seconds` is ignored. Not 'music' — that stays lab_generate_music, it binds a different stem | |
| stems | No | SPLIT ONLY: which parts to separate out. Left out, you get the voice and the rest of the recording, each part as its own audio row. Asking for a subset drops what you leave out — there is no combined everything-but-the-voice file, that would be a mixdown the provider never made. | |
| prompt | No | What the sound should be. For sfx/ambience: name the source and character of the sound. For dialog/voiceover: the line or text to speak. Required for every art EXCEPT foley — foley watches the clip, so leaving it empty means 'take what you see', and a prompt merely steers it | |
| audio_id | No | REPAIR KINDS ONLY, and the best of the three ways to name a source: an existing audio row of this project (from lab_list_audio), which has an owner and an address that belongs to us. Chain it — denoise a row, then split the result. The row must already carry an audio_url; a pending one has no file yet. | |
| get_cost | No | `true` reports the price and your balance WITHOUT generating anything and without spending quota. Not drawn from the lab_list_models catalog (that covers image/video models only) — audio pricing follows the provider FilmLab picks for `art`, and each kind is billed by its own unit: per run, per second, or per character. For the spoken kinds the price follows the length of your text, which the cost endpoint cannot take: the answer then names the provider and your balance and reports `cost_generations` as null rather than inventing a number — the real amount comes back with the call. | |
| video_id | No | The clip to work from. For FOLEY it is required to RUN one; for the repair kinds it is one of the three ways to name a source, and the backend extracts the audio track from it. From lab_list_assets or the row an animate call returned; the clip must belong to this project. The backend measures its length and rejects sources it will not process, before anything is charged. A price question (`get_cost: true`) does NOT need it — the price follows a length, not a particular clip. | |
| audio_url | No | REPAIR KINDS ONLY, and the last resort: a bare address of a sound file. It carries no owner, so nothing can be checked against the project — prefer `audio_id` or `video_id`. A provider address is copied into our own storage first, and if that fails the call is refused rather than stored with a deadline. | |
| scene_ref | No | Optional scene label, stored on the row. Useful to tell several tracks of one project apart | |
| project_id | Yes | Project id (from lab_list_projects) — positive integer as string | |
| duration_seconds | No | Desired length in seconds. The backend clamps this to what the chosen provider actually supports for this `art` — dialog/voiceover ignore it entirely, the length follows the text, and foley ignores it too, its length follows the clip. The repair kinds ignore it as well: you clean up a file, not a stretch of it. One exception, and only for asking: in a `get_cost` query on foley or a repair kind, naming it prices THAT length instead of the ceiling. There is no lab_list_models entry for audio: the provider isn't a choice you make here, it's picked automatically per `art`. |