Spiral gives your agent every tool with one account. Browse the tools →

Muse Code · Audio

How to Use Stable Audio 3 Medium Audio Inpainting in Muse Code

Stable Audio 3 Medium Audio Inpainting replaces a selected passage or continues an existing recording using the surrounding sound as context. It lets you revise part of a track while preserving the audio outside the selection.

Prompts to try with Stable Audio 3 Medium Audio Inpainting in Muse Code

Copy an example into Muse Code, or ask in your own words.

Use Stable Audio 3 Medium Audio Inpainting on assets/audio/menu.wav. Replace seconds 12 through 24 with quiet ambient piano and sustained strings, matching the surrounding mood. Keep the total length unchanged and save a separate review copy.

Stable Audio 3 Medium Audio InpaintingMuse Code
Try asking
  • Use Stable Audio 3 Medium Audio Inpainting to continue assets/audio/intro.wav from 20 seconds to 45 seconds total. Request restrained electronic music with soft synth chords and a steady pulse. Save the result beside the original.

  • Use Stable Audio 3 Medium Audio Inpainting on assets/audio/exploration.wav. Rework seconds 30 through 50 as sparse instrumental music with muted percussion and warm bass. Preserve everything outside that passage.

  • Use Stable Audio 3 Medium Audio Inpainting to make three alternate endings for assets/audio/outro.wav, replacing seconds 20 through 35. Request a gentle acoustic resolution each time, use eight sampling steps, and save each take separately.

  • Use Stable Audio 3 Medium Audio Inpainting on assets/audio/demo-bed.wav. Replace seconds 10 through 25 with restrained jazz, brushed drums, and softly played upright bass. Keep the seed fixed while comparing two descriptions of the piano part.

How to set up Stable Audio 3 Medium Audio Inpainting in Muse Code

Pick the way that suits you. Each takes about two minutes.

Use Spiral's MCP server

  1. Install Muse Code
    curl -fsSL https://dev.meta.ai/install.sh | bash
  2. Ask Muse to add the server

    Start muse and ask:

    Add the Spiral MCP server at https://api.spiral.ai/mcp
  3. Sign in

    In your terminal, run:

    muse mcp login spiral

Use the Spiral skill

  1. Send Muse Code this message

    Your agent reads Spiral's skill and sets itself up.

    set up https://spiral.ai/SKILL.md
  2. Sign in or paste a key

    Approve Spiral in the browser, or give the agent a key from the console.

Use the Spiral CLI

  1. Install and sign in

    Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

    npx -y spiral-cli@latest init

Call the Spiral API

  1. Create an API key

    In the console, under API keys.

  2. Run Stable Audio 3 Medium Audio Inpainting

    One request; the result comes back by polling or a webhook.

    curl https://api.spiral.ai/v1/runs \
      -H "Authorization: Bearer $SPIRAL_API_KEY" \
      -H "Content-Type: application/json" \
      -H "Idempotency-Key: $(uuidgen)" \
      -d '{
        "provider": "fal",
        "model": "fal-ai/stable-audio-3/medium/audio-inpainting",
        "input": {
          "prompt": "punchy kick drum fill",
          "audio_url": "https://storage.googleapis.com/falserverless/model_tests/diffrythm/rock_en.wav",
          "mask_start_seconds": 4,
          "mask_end_seconds": 8
        }
      }'

Then paste one of the prompts above: Muse Code finds Stable Audio 3 Medium Audio Inpainting on Spiral, shows the price and runs it.

Stable Audio 3 Medium Audio Inpainting providers and prices

Spiral runs Stable Audio 3 Medium Audio Inpainting through fal. Open a card for today's price, with every fee included.

falAudio
Stable Audio 3 Medium Audio Inpainting · Audio Inpainting Medium
fal-ai/stable-audio-3/medium/audio-inpainting

Settings you can ask for

Stable Audio 3 Medium Audio Inpainting works from your prompt and audio URL. Ask Muse Code for any of these in your prompt.

SettingAllowed valuesDefaultDescription
Negative promptwhat to leave out, in words

Text description of qualities to avoid in the output.

Number of inference steps1 to 1008

Number of sampling steps. Post-trained (distilled) checkpoints look good with the default 8 and gain little from going higher.

Guidance scale0 to 251

Classifier-free guidance scale. Higher values follow the prompt more strictly. Only effective on base (non-distilled) checkpoints.

Seeda whole number

Random seed for reproducible outputs. Omit for a random seed.

Enable prompt expansionon or offoff

If True, the prompt will be expanded using an LLM for more detailed and higher quality results.

Output formatmp3, wav, flac, ogg, opus, m4a, or aacmp3

Container format for the generated audio output.

Mask start seconds0 to 380

Start of the region to regenerate, in seconds.

Mask end seconds0 to 380

End of the region to regenerate, in seconds.

Every API field of Stable Audio 3 Medium Audio Inpainting · Audio Inpainting Medium is on its tool page: open its card above.

What can you do with Stable Audio 3 Medium Audio Inpainting in Muse Code?

Revise a project's instrumental audio without rebuilding the entire cue. A coding agent can work from project recordings, prepare targeted replacements, and keep the results ready for review.

Replace a transition

Regenerate the passage between two sections of an instrumental track, describing the rhythm and energy you want at the handoff.

Simplify music beneath narration

Rework a busy passage in an instrumental background track into a sparse arrangement before mixing it under a voiceover.

Extend a podcast music bed

Continue an existing instrumental cue to fit a longer introduction, keeping the finished recording within 6 minutes 20 seconds.

Try another ending

Replace the closing passage of a music cue with a quieter resolution while keeping its opening and middle.

Revise game music

Create an alternate passage in an existing game soundtrack cue, such as a restrained exploration section with fewer percussion accents.

Compare arrangement ideas

Generate several takes of the same selected passage, changing the instrument emphasis or mood while retaining the surrounding track.

Questions about Stable Audio 3 Medium Audio Inpainting in Muse Code

Can Muse Code use Stable Audio 3 Medium Audio Inpainting?

Yes. Add Spiral to Muse Code as an MCP server, and Muse Code can find and run Stable Audio 3 Medium Audio Inpainting like any built-in tool.

How much does Stable Audio 3 Medium Audio Inpainting cost in Muse Code?

$0.05746 per run at the default inputs. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Muse Code plan is separate.

Do I need a fal account to use Stable Audio 3 Medium Audio Inpainting in Muse Code?

No. Spiral runs Stable Audio 3 Medium Audio Inpainting on its own fal account. You sign in to Spiral once and never paste a key.

How long does it take to set up Stable Audio 3 Medium Audio Inpainting in Muse Code?

About two minutes: install Muse Code, then ask Muse to add the server, then sign in.

Does Muse Code wait while Stable Audio 3 Medium Audio Inpainting runs?

Stable Audio 3 Medium Audio Inpainting runs in the background. Muse Code starts the run, checks on it and gives you the audio when it's ready.

What does audio inpainting change?

It regenerates the selected passage using the surrounding recording as context. Audio outside the selection stays intact.

Can Stable Audio 3 Medium extend a recording?

Yes. Continuation generates material after the existing recording, with a total supported length of up to 6 minutes 20 seconds.

Can it generate narration or spoken dialogue?

Stable Audio 3 is not designed for speech or voice generation. Use it for instrumental audio editing rather than a passage that needs understandable words.

What should I include in an editing prompt?

Describe the music you want to hear: genre, instruments, rhythm, mood, arrangement, and recording character. For example, ask for a restrained jazz passage with brushed drums and a softly played upright bass.

Should I write prompts in English?

Yes. Stable Audio 3 was trained on English descriptions, and Stability says other languages underperform.

Get started

Start using Stable Audio 3 Medium Audio Inpainting in Muse Code

One Spiral account for every tool your agent needs. No subscription; you pay per run.

Paste this into Muse Code:

Set up Muse Code

set up https://spiral.ai/SKILL.md
Are you an AI agent? See setup options