Skip to content
Docs menu

Step 2: three layers in one call

Step 2 of 8

Generate a bed, close detail and distant depth together.

A single sound is not a scene. A believable scene is layers: a steady bed, close detail and distant depth. Generate all three in one call by giving a list of prompts instead of one. One file comes back per prompt, in the same order.

def ambience_prompts(scene: str, mood: str) -> list[str]:
    return [
        f"{scene}, steady ambient bed, {mood} mood",
        f"{scene}, close detail sounds, {mood} mood",
        f"{scene}, distant background layers, {mood} mood",
    ]

prompts = ambience_prompts("rainy night street", "calm")
sounds = catalyst.wave.generate(prompts=prompts, duration=8)
for i, (prompt, f) in enumerate(zip(prompts, sounds.files), start=1):
    catalyst.download(f, f"ambience-{i}.mp3")

Why one call and not three? Fewer round trips, one request id to quote, and the layers share a session. Limits to remember: 1 to 50 prompts per call, each 1 to 8000 characters, and duration above 0 and at most 300 seconds.