Failed to load versions. Head to the versions page to see all versions for this model.
You're looking at a specific version of this model. Jump to the model overview.
mtg /essentia-bpm:b3045c35
Input
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run mtg/essentia-bpm using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"mtg/essentia-bpm:b3045c359817fea53678791886d50aa3e3a995dc4796fe74db0de156d5074a43",
{
input: {
url: "https://www.youtube.com/watch?v=5-XfBN3olvE",
algo_type: "deepsquare-k16"
}
}
);
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=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run mtg/essentia-bpm using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"mtg/essentia-bpm:b3045c359817fea53678791886d50aa3e3a995dc4796fe74db0de156d5074a43",
input={
"url": "https://www.youtube.com/watch?v=5-XfBN3olvE",
"algo_type": "deepsquare-k16"
}
)
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=<paste-your-token-here>
Find your API token in your account settings.
Run mtg/essentia-bpm 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": "b3045c359817fea53678791886d50aa3e3a995dc4796fe74db0de156d5074a43",
"input": {
"url": "https://www.youtube.com/watch?v=5-XfBN3olvE",
"algo_type": "deepsquare-k16"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
Rendering markdown...
{
"completed_at": "2023-11-30T10:58:18.095332Z",
"created_at": "2023-11-30T10:58:07.874800Z",
"data_removed": false,
"error": null,
"id": "xmdbg2rbdv6u2vd2zlynkq73uu",
"input": {
"url": "https://www.youtube.com/watch?v=5-XfBN3olvE",
"algo_type": "deepsquare-k16"
},
"logs": "[youtube] 5-XfBN3olvE: Downloading webpage\n[youtube] 5-XfBN3olvE: Downloading player 5753e790\n[dashsegments] Total fragments: 1\n[download] Destination: /tmp/tmpv7ejeaw3/audio.webm\n[download] 0.0% of ~4.95MiB at 6.94KiB/s ETA 12:10\n[download] 0.1% of ~4.95MiB at 20.79KiB/s ETA 04:03\n[download] 0.1% of ~4.95MiB at 48.42KiB/s ETA 01:44\n[download] 0.3% of ~4.95MiB at 103.49KiB/s ETA 00:48\n[download] 0.6% of ~4.95MiB at 201.98KiB/s ETA 00:24\n[download] 1.2% of ~4.95MiB at 388.21KiB/s ETA 00:12\n[download] 2.5% of ~4.95MiB at 738.33KiB/s ETA 00:06\n[download] 5.0% of ~4.95MiB at 1.37MiB/s ETA 00:03\n[download] 10.1% of ~4.95MiB at 2.59MiB/s ETA 00:01\n[download] 20.2% of ~4.95MiB at 4.92MiB/s ETA 00:00\n[download] 40.4% of ~4.95MiB at 9.35MiB/s ETA 00:00\n[download] 80.8% of ~4.95MiB at 17.58MiB/s ETA 00:00\n[download] 100.0% of ~4.95MiB at 21.41MiB/s ETA 00:00\n[download] 100.0% of ~4.95MiB at 21.36MiB/s ETA 00:00\n[download] 100% of 4.95MiB in 00:00\n[ffmpeg] Destination: /tmp/tmpv7ejeaw3/audio.wav\nDeleting original file /tmp/tmpv7ejeaw3/audio.webm (pass -k to keep)\nloading audio...\nrunning analysis algorithm...\nDEBUG size before resample 14819841\nDEBUG size after resample 3704961\nDEBUG [0. 0. 0. ... 0. 0. 0.]\n2023-11-30 10:58:17.387081: I tensorflow/core/platform/profile_utils/cpu_utils.cc:114] CPU Frequency: 2299995000 Hz\ndone!",
"metrics": {
"predict_time": 8.331015,
"total_time": 10.220532
},
"output": "https://replicate.delivery/pbxt/jitCG30GoS6LPVBbIxsLJVmc4k25bDZgFSc7KPIA2fmk5weRA/out.md",
"started_at": "2023-11-30T10:58:09.764317Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/xmdbg2rbdv6u2vd2zlynkq73uu",
"cancel": "https://api.replicate.com/v1/predictions/xmdbg2rbdv6u2vd2zlynkq73uu/cancel"
},
"version": "b3045c359817fea53678791886d50aa3e3a995dc4796fe74db0de156d5074a43"
}
[youtube] 5-XfBN3olvE: Downloading webpage
[youtube] 5-XfBN3olvE: Downloading player 5753e790
[dashsegments] Total fragments: 1
[download] Destination: /tmp/tmpv7ejeaw3/audio.webm
[download] 0.0% of ~4.95MiB at 6.94KiB/s ETA 12:10
[download] 0.1% of ~4.95MiB at 20.79KiB/s ETA 04:03
[download] 0.1% of ~4.95MiB at 48.42KiB/s ETA 01:44
[download] 0.3% of ~4.95MiB at 103.49KiB/s ETA 00:48
[download] 0.6% of ~4.95MiB at 201.98KiB/s ETA 00:24
[download] 1.2% of ~4.95MiB at 388.21KiB/s ETA 00:12
[download] 2.5% of ~4.95MiB at 738.33KiB/s ETA 00:06
[download] 5.0% of ~4.95MiB at 1.37MiB/s ETA 00:03
[download] 10.1% of ~4.95MiB at 2.59MiB/s ETA 00:01
[download] 20.2% of ~4.95MiB at 4.92MiB/s ETA 00:00
[download] 40.4% of ~4.95MiB at 9.35MiB/s ETA 00:00
[download] 80.8% of ~4.95MiB at 17.58MiB/s ETA 00:00
[download] 100.0% of ~4.95MiB at 21.41MiB/s ETA 00:00
[download] 100.0% of ~4.95MiB at 21.36MiB/s ETA 00:00
[download] 100% of 4.95MiB in 00:00
[ffmpeg] Destination: /tmp/tmpv7ejeaw3/audio.wav
Deleting original file /tmp/tmpv7ejeaw3/audio.webm (pass -k to keep)
loading audio...
running analysis algorithm...
DEBUG size before resample 14819841
DEBUG size after resample 3704961
DEBUG [0. 0. 0. ... 0. 0. 0.]
2023-11-30 10:58:17.387081: I tensorflow/core/platform/profile_utils/cpu_utils.cc:114] CPU Frequency: 2299995000 Hz
done!