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.
This is a modal window.
Beginning of dialog window. Escape will cancel and close the window.
End of dialog window.
Audio file to process
YouTube URL to process (overrides audio input)
Embedding type to use: vggish, or musicnn
Default: "msd-musicnn"
Arousal/Valence training dataset
Default: "emomusic"
Output either a bar chart visualization or a JSON blob
Default: "Visualization"
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
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/music-arousal-valence using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "mtg/music-arousal-valence:9ae3915e0727ccad372d2608fe076cad87437306da79876df695c82a63149175", { input: { audio: "https://replicate.delivery/mgxm/907f9b45-185c-41b1-96af-f2742bada25b/rock.mp3", dataset: "emomusic", output_format: "Visualization", embedding_type: "msd-musicnn" } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
import replicate
output = replicate.run( "mtg/music-arousal-valence:9ae3915e0727ccad372d2608fe076cad87437306da79876df695c82a63149175", input={ "audio": "https://replicate.delivery/mgxm/907f9b45-185c-41b1-96af-f2742bada25b/rock.mp3", "dataset": "emomusic", "output_format": "Visualization", "embedding_type": "msd-musicnn" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "9ae3915e0727ccad372d2608fe076cad87437306da79876df695c82a63149175", "input": { "audio": "https://replicate.delivery/mgxm/907f9b45-185c-41b1-96af-f2742bada25b/rock.mp3", "dataset": "emomusic", "output_format": "Visualization", "embedding_type": "msd-musicnn" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{ "completed_at": "2022-06-13T10:23:18.621655Z", "created_at": "2022-06-13T10:23:03.231861Z", "data_removed": false, "error": null, "id": "ugzdnukrgvdajhdtk545tiem34", "input": { "audio": "https://replicate.delivery/mgxm/907f9b45-185c-41b1-96af-f2742bada25b/rock.mp3", "dataset": "emomusic", "embedding_type": "msd-musicnn" }, "logs": null, "metrics": { "predict_time": 7.911718, "total_time": 15.389794 }, "output": "https://replicate.delivery/mgxm/9e232b54-eed5-48d1-a0bb-5d800bb59f75/out.png", "started_at": "2022-06-13T10:23:10.709937Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/ugzdnukrgvdajhdtk545tiem34", "cancel": "https://api.replicate.com/v1/predictions/ugzdnukrgvdajhdtk545tiem34/cancel" }, "version": "1064850eeb2853ac69d7ff50c05404e7113ade77e176a6760086354e49c13dee" }
This example was created by a different version, mtg/music-arousal-valence:1064850e.
Choose a file from your machine
Hint: you can also drag files onto the input