# Replace Audio

> Give a video new music and keep what people say in it, or replace all its sound. The music comes from a file or is made from a prompt, in one run.

Source: https://nodaro.ai/docs/nodes/video/replace-audio

The **Replace Audio** node gives a video a new soundtrack without losing what people say in it. It separates the speech from everything else in the video's sound, lays the new music under it, and lays the mix on the video in place of its original sound. The music dips while someone talks and comes back up in the pauses.

The new music is either a file you connect or a track made for you from a prompt. Everything runs as one job, with one price and one refund: if any step fails, the whole run is refunded.

Replace Audio runs on Nodaro Cloud only. On a self-hosted install the node is not offered, and a workflow that holds one cannot run it.

## When to use it
- Put new music under a talking-head clip, an interview or a tutorial without losing the voice.
- Swap an unwanted or copyrighted soundtrack for a licensed or generated one, and keep the dialogue.
- Give a series of clips the same music bed.
- Make a version of an ad with a different mood, from a music prompt.

## Quick start
### Add the node

Press Tab on the canvas and choose **Video › Sound for Video › Replace Audio**.

### Connect the video

Wire the video whose sound you want to replace into the **Video** input.

### Choose the music

To use a file, wire an audio, or a video whose sound is used, into the **Music** input. To make the music instead, set **Music** to **Make it from a prompt** in the settings panel and describe it in **Music prompt**.

### Run it

Click **Run** on the node. The video with its new sound appears on the node.

Workflow: An interview keeps its voice, and a licensed track replaces its music.

- Upload Video → Replace Audio (video)
- Upload Audio → Replace Audio (music)

## Inputs
| Input | Accepts | What it does |
| --- | --- | --- |
| **Video** | Video nodes | The video whose sound is replaced. Required. |
| **Music** | Audio and video nodes | The new music: an audio, or a video whose sound is used. Connect one source. Leave it empty when the music is made from a prompt. |

## Outputs
The output, **Video**, is the video with its new sound. It is exactly as long as the video: music that is shorter ends in silence, and music that is longer is cut.

The run also keeps three tracks of its own, shown under the node and in the job: the final **Mix**, the new **Music**, and the separated **Speech** when it was kept.

## Settings
| Setting | What it does |
| --- | --- |
| **Mode** | **Keep the speech**, the default, keeps the speech and replaces the music. **Replace all the sound** makes the new music the video's only sound, speech included. |
| **Music** | Where the new music comes from: **Connected music**, the default, or **Make it from a prompt**. |
| **Music prompt** | The music to make, described in words, up to 1,000 characters. For example: "warm lo-fi piano, slow, gentle". Only with **Make it from a prompt**. The result is an instrumental as long as the video. |
| **Music volume** | How loud the new music plays, from 0% to 200%. The default is 80%. |
| **Speech volume** | How loud the kept speech plays, from 0% to 200%. The default is 100%. |
| **Duck under speech** | How far the music dips while someone speaks, from 0 to 100. The default is 70. At 0 the music stays level. Keep the speech mode only. |

## Limits
- Videos up to 10 minutes, and up to 6 minutes when the music is made from a prompt.
- Files up to 500 MB.
- A file that cannot be read, a video with no picture, or music with no sound is refused before anything is charged.

## Credits
Replace Audio costs one price per run, set by the mode and by where the music comes from. The length of the video does not change the price.

- **Keep the speech** costs more than **Replace all the sound**, because it separates the speech first.
- **Music made from a prompt** costs more than a music file, because the music is made in the run.
- A run is priced by what it does. **Keep the speech** on a video with no sound has no speech to keep, so it runs, and is charged, as **Replace all the sound**.
- If any step fails, the whole run is refunded.

The node shows its price per run in the settings panel and on the **Run** button.

## Tips
- **Keep the speech for voices.** Use **Keep the speech** for talking-head clips, interviews, tutorials and ads with a voiceover. The voice stays clear over the new music.
- **Replace everything for music-only clips.** Use **Replace all the sound** when nothing in the original sound should stay, for example a clip whose sound is only music or noise.
- **Tune the duck.** Raise **Duck under speech** when the music competes with the voice. Lower it for a music bed that should stay present.
- **Long music is fine.** A music file longer than the video is cut where the video ends.
- **For several tracks, use Merge Video & Audio.** To add a voiceover, music and effects with their own start times, use [Merge Video & Audio](https://nodaro.ai/docs/nodes/video/merge-video-audio).

## From the API
`POST /v1/replace-audio` takes `videoUrl` and exactly one music source, `musicUrl` or `musicPrompt`, plus the optional `mode` (`keep-speech` or `replace-all`), `musicVolume`, `speechVolume` and `duckAmount`. It answers `{ jobId }`; poll `GET /v1/jobs/:jobId`. An `Idempotency-Key` header makes a retry answer the job it already started. A file past a limit is a `413`, and a file that cannot be read is a `422`, both before anything is charged.

The SDK method is `client.media.replaceAudio`, and the MCP tool is `replace_audio`. See [Voice and media](https://nodaro.ai/docs/developers/api/voice-and-media).

## Frequently asked questions

### What does Replace Audio do?

Replace Audio gives a video a new soundtrack. In Keep the speech mode it separates the speech from the rest of the sound, lays the new music under it, and lowers the music while someone talks. In Replace all the sound mode the new music is the only sound.

### Where does the new music come from?

Either a file you connect to the Music input, an audio or a video whose sound is used, or a track made for you from a prompt. A track made from a prompt is an instrumental as long as the video.

### How long is the result?

The result is exactly as long as the video. Music that is shorter than the video ends in silence, and music that is longer is cut where the video ends.

### How many credits does Replace Audio cost?

One price per run, set by the mode and by where the music comes from. The length of the video does not change it. Keep the speech costs more than Replace all the sound, and music made from a prompt costs more than a file. The Run button shows the price.

### Can I use Replace Audio on a self-hosted install?

No. Replace Audio runs on Nodaro Cloud only. On a self-hosted install the node is not offered, and a workflow that holds one cannot run it.
