Skip to content
Docs menu

Build Soundscape Studio

Turn a scene description into a sound kit, step by step.

In this tutorial you build Soundscape Studio, a small command-line product that turns a scene description into a ready-to-use sound kit: three layers of ambience and a music bed, saved to a folder together with a manifest that records what was made and what it cost.

Output
$ soundscape "rainy night street" --mood calm --out kit

Balance: 1000 plumes
Generating 3 ambience layers...
  saved kit/ambience-1.mp3
  saved kit/ambience-2.mp3
  saved kit/ambience-3.mp3
Composing 30s of music...
  saved kit/music.mp3
Done. 55 plumes spent. Manifest: kit/manifest.json

Build it in Python, TypeScript or Rust: use the language switch on any code block, and every page follows your choice. The finished programs have been run end to end.

What you will learn: creating a client, generating sound effects and music, downloading files, how sessions work, checking your balance, running long jobs in the background, handling every kind of error, and shipping a program other people can run. Time: about 30 minutes.

The development plan

This is the order the program is built in, as a plan you can reuse for your own product. Each milestone ends with something you can run and check.

#MilestoneYou buildYou are done when
M1Prove the callStep 1: one sound, one downloadA playable file exists, and the program prints its id and cost.
M2Make it a sceneSteps 2 and 3: three layers, then musicFour files exist and the three ambience prompts differ.
M3Make it safe to runSteps 4 and 5: sessions, balance check, costWith a zero balance the program stops before spending, with a clear message.
M4Make it robustSteps 6 and 7: background jobs, every error kindYou have seen each error message by running against a failing server.
M5Make it shareableStep 8: manifest and command lineA colleague with only a key can run it and get the same folder shape.
M6ShipRun it: switch to a live key in deployment onlyOne live run on a short scene matches the cost usage reports.
Tip

Use a test key (fal_test_...) for the whole tutorial. It is free and behaves like a live key.

In this section