typefile
{
"audio": "https://replicate.delivery/pbxt/JQ8v4dbyBga3g3ZFXP8t73Ioz97xpbdwwJWFR93N9Hvhdb0i/Nettie%20-%20Type%20O%20Negative.mp3"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_1wv**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run soykertje/spleeter using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"soykertje/spleeter:cd128044253523c86abfd743dea680c88559ad975ccd72378c8433f067ab5d0a",
{
input: {
audio: "https://replicate.delivery/pbxt/JQ8v4dbyBga3g3ZFXP8t73Ioz97xpbdwwJWFR93N9Hvhdb0i/Nettie%20-%20Type%20O%20Negative.mp3"
}
}
);
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_1wv**********************************
This is your API token. Keep it to yourself.
import replicate
Run soykertje/spleeter using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"soykertje/spleeter:cd128044253523c86abfd743dea680c88559ad975ccd72378c8433f067ab5d0a",
input={
"audio": "https://replicate.delivery/pbxt/JQ8v4dbyBga3g3ZFXP8t73Ioz97xpbdwwJWFR93N9Hvhdb0i/Nettie%20-%20Type%20O%20Negative.mp3"
}
)
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_1wv**********************************
This is your API token. Keep it to yourself.
Run soykertje/spleeter 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": "soykertje/spleeter:cd128044253523c86abfd743dea680c88559ad975ccd72378c8433f067ab5d0a",
"input": {
"audio": "https://replicate.delivery/pbxt/JQ8v4dbyBga3g3ZFXP8t73Ioz97xpbdwwJWFR93N9Hvhdb0i/Nettie%20-%20Type%20O%20Negative.mp3"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Object output with 2 properties
{
"id": "ezywlczba4xdvimm7lgyu2ofge",
"model": "soykertje/spleeter",
"version": "cd128044253523c86abfd743dea680c88559ad975ccd72378c8433f067ab5d0a",
"input": {
"audio": "https://replicate.delivery/pbxt/JQ8v4dbyBga3g3ZFXP8t73Ioz97xpbdwwJWFR93N9Hvhdb0i/Nettie%20-%20Type%20O%20Negative.mp3"
},
"logs": "INFO:spleeter:File /tmp/tmpqqw8u2di/vocals.wav written succesfully\nINFO:spleeter:File /tmp/tmpqqw8u2di/accompaniment.wav written succesfully",
"output": {
"accompaniment": "https://pbxt.replicate.delivery/UyWAC41T81aJOFMvEuedXEJzCi4ne0fWTA4Xa4TdDNQmsL8iA/accompaniment.wav",
"vocals": "https://pbxt.replicate.delivery/wUbjzNe8z0zDRKSnvD3YeA7UnSf2rfC8ANcJL83YQGsIZX4FB/vocals.wav"
},
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-08-27T01:48:59.85853Z",
"started_at": "2023-08-27T01:48:59.88994Z",
"completed_at": "2023-08-27T01:49:08.93249Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/ezywlczba4xdvimm7lgyu2ofge/cancel",
"get": "https://api.replicate.com/v1/predictions/ezywlczba4xdvimm7lgyu2ofge"
},
"metrics": {
"predict_time": 9.04255,
"total_time": 9.07396
}
}