/v1/tools/mix_soundspricedMix sounds
Mixes sound clips on tracks into one M4A: parts of a recording, voices, music and Scrub's chimes and room sounds, each at its moment and level, a room's sound looped, music lowered under a voice if asked, so a recording can be cut into clips with gaps. As long as the last clip's end. It only mixes.
Takes timeline (sound clips on tracks). Returns sound (the mix as one sound, an M4A, as long as the last clip's end, brought to an even loudness without clipping).
$0.01 a minute of sound, up to 90 minutes.
Afterwards, change timeline with adjust; quote_adjustment prices the change.
Fields
| Field | Type | Default | What it is |
|---|---|---|---|
timeline | object | Required | The tracks, each a list of clips: {tracks: [{gain_db?, voice?, clips: [{file or sound, at, from?, to, loop?, gain_db?}]}]}. A clip is a sound or video file of yours (file, its file_id) or one of Scrub's sounds, by its name (sound), the chimes and room sounds Add a voice effect plays; at is where it starts on the timeline, from and to the part of its sound used, in seconds (a chime runs about 2 to 3 seconds, a room's sound 30 and loops); loop repeats it to fill that part; gain_db makes a clip or a whole track louder or quieter. voice: true says a track is someone speaking: while it speaks, every other track is lowered under it, so the words are heard over the music, and comes back up when it stops. Off unless set. |
Call it
Request
curl -X POST https://app.scrub.app/v1/tools/mix_sounds \
-H "Authorization: Bearer $SCRUB_KEY" \
-H "Content-Type: application/json" \
-d '{"timeline":{}}'Answer
{
"ok": true,
"result": {
"job_id": "job_…",
"status": "running",
"price_usd": "$…"
}
}It starts at once and answers running. Ask job_status with the job_id for its result. quote gives its price first, free.
Every call can also answer an error: what comes back. Try it with your key from Account.