typefile
{
"audio": "https://replicate.delivery/pbxt/J6Quo9VPU210JJB9HS97ThWUxT7iax8PWiP7FD5f3bg2G6AY/test1.mp3",
"clip_mode": "rescale",
"model_name": "htdemucs",
"mp3_bitrate": 320,
"output_format": "mp3",
"overlap": 0.25,
"shifts": 1
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_XsF**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run cjwbw/demucs using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"cjwbw/demucs:abf8fe28e407afa6d8e41e86a759caccc0af8e49c3c68016006b62cb0968441e",
{
input: {
audio: "https://replicate.delivery/pbxt/J6Quo9VPU210JJB9HS97ThWUxT7iax8PWiP7FD5f3bg2G6AY/test1.mp3",
clip_mode: "rescale",
model_name: "htdemucs",
mp3_bitrate: 320,
output_format: "mp3",
overlap: 0.25,
shifts: 1
}
}
);
console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_XsF**********************************
This is your API token. Keep it to yourself.
import replicate
Run cjwbw/demucs using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"cjwbw/demucs:abf8fe28e407afa6d8e41e86a759caccc0af8e49c3c68016006b62cb0968441e",
input={
"audio": "https://replicate.delivery/pbxt/J6Quo9VPU210JJB9HS97ThWUxT7iax8PWiP7FD5f3bg2G6AY/test1.mp3",
"clip_mode": "rescale",
"model_name": "htdemucs",
"mp3_bitrate": 320,
"output_format": "mp3",
"overlap": 0.25,
"shifts": 1
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_XsF**********************************
This is your API token. Keep it to yourself.
Run cjwbw/demucs using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \
-H "Authorization: Bearer $REPLICATE_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Prefer: wait" \
-d $'{
"version": "cjwbw/demucs:abf8fe28e407afa6d8e41e86a759caccc0af8e49c3c68016006b62cb0968441e",
"input": {
"audio": "https://replicate.delivery/pbxt/J6Quo9VPU210JJB9HS97ThWUxT7iax8PWiP7FD5f3bg2G6AY/test1.mp3",
"clip_mode": "rescale",
"model_name": "htdemucs",
"mp3_bitrate": 320,
"output_format": "mp3",
"overlap": 0.25,
"shifts": 1
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Object output with 4 properties
{
"id": "dc65harbsxzisn5qzyc5ekhfrm",
"model": "cjwbw/demucs",
"version": "abf8fe28e407afa6d8e41e86a759caccc0af8e49c3c68016006b62cb0968441e",
"input": {
"audio": "https://replicate.delivery/pbxt/J6Quo9VPU210JJB9HS97ThWUxT7iax8PWiP7FD5f3bg2G6AY/test1.mp3",
"clip_mode": "rescale",
"model_name": "htdemucs",
"mp3_bitrate": 320,
"output_format": "mp3",
"overlap": 0.25,
"shifts": 1
},
"logs": "0%| | 0.0/11.7 [00:00<?, ?seconds/s]\n 50%|█████████████████████████████████████ | 5.85/11.7 [00:01<00:01, 3.19seconds/s]\n100%|██████████████████████████████████████████████████████████████████████████| 11.7/11.7 [00:02<00:00, 6.59seconds/s]\n100%|██████████████████████████████████████████████████████████████████████████| 11.7/11.7 [00:02<00:00, 5.68seconds/s]",
"output": {
"bass": "https://replicate.delivery/pbxt/xS2oNA7iL0rzLpKVzafqakkr1fT6p2RdgfWz8hJzpE3jUlXiA/bass.mp3",
"drums": "https://replicate.delivery/pbxt/OZduILkg6lYgEd2Dq02z4u0GlZWZxTCjipGp2VBAssokq8SE/drums.mp3",
"guitar": null,
"other": "https://replicate.delivery/pbxt/aoDOOSdliPIzPd7fqCM0MXRH1anPeJp14NcqmUPpCyGTqyLRA/other.mp3",
"piano": null,
"vocals": "https://replicate.delivery/pbxt/QmkyLa6ikf0AfUObCIO1M6hEaYVoIekVZdZiwLMRu6aiUlXiA/vocals.mp3"
},
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-07-02T13:09:45.628835Z",
"started_at": "2023-07-02T13:15:49.151717Z",
"completed_at": "2023-07-02T13:16:03.793953Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/dc65harbsxzisn5qzyc5ekhfrm/cancel",
"get": "https://api.replicate.com/v1/predictions/dc65harbsxzisn5qzyc5ekhfrm"
},
"metrics": {
"predict_time": 14.642236,
"total_time": 378.165118
}
}