typefile
{
"audio": "https://replicate.delivery/pbxt/JN0hxKyz6zBscSeQ4HEQi5hzfOgFRKtGJ05a70zEoM0rXWQz/Carolina%20Gaita%CC%81n%20-%20La%20Gaita%20-%20We%20Don%27t%20Talk%20About%20Bruno.mp3",
"mode": "chord"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_Zjn**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run e7mac/omnizart using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"e7mac/omnizart:a5133fb781de9811a87093c5bef340f7c57d0ed9c368be136f117354768e88c1",
{
input: {
audio: "https://replicate.delivery/pbxt/JN0hxKyz6zBscSeQ4HEQi5hzfOgFRKtGJ05a70zEoM0rXWQz/Carolina%20Gaita%CC%81n%20-%20La%20Gaita%20-%20We%20Don%27t%20Talk%20About%20Bruno.mp3",
mode: "chord"
}
}
);
// To access the file URL:
console.log(output.url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", 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_Zjn**********************************
This is your API token. Keep it to yourself.
import replicate
Run e7mac/omnizart using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"e7mac/omnizart:a5133fb781de9811a87093c5bef340f7c57d0ed9c368be136f117354768e88c1",
input={
"audio": "https://replicate.delivery/pbxt/JN0hxKyz6zBscSeQ4HEQi5hzfOgFRKtGJ05a70zEoM0rXWQz/Carolina%20Gaita%CC%81n%20-%20La%20Gaita%20-%20We%20Don%27t%20Talk%20About%20Bruno.mp3",
"mode": "chord"
}
)
# To access the file URL:
print(output.url())
#=> "http://example.com"
# To write the file to disk:
with open("my-image.png", "wb") as file:
file.write(output.read())
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_Zjn**********************************
This is your API token. Keep it to yourself.
Run e7mac/omnizart 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": "e7mac/omnizart:a5133fb781de9811a87093c5bef340f7c57d0ed9c368be136f117354768e88c1",
"input": {
"audio": "https://replicate.delivery/pbxt/JN0hxKyz6zBscSeQ4HEQi5hzfOgFRKtGJ05a70zEoM0rXWQz/Carolina%20Gaita%CC%81n%20-%20La%20Gaita%20-%20We%20Don%27t%20Talk%20About%20Bruno.mp3",
"mode": "chord"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "4hhxdpdbzrlfcs6sgl3aarrhyi",
"model": "e7mac/omnizart",
"version": "a5133fb781de9811a87093c5bef340f7c57d0ed9c368be136f117354768e88c1",
"input": {
"audio": "https://replicate.delivery/pbxt/JN0hxKyz6zBscSeQ4HEQi5hzfOgFRKtGJ05a70zEoM0rXWQz/Carolina%20Gaita%CC%81n%20-%20La%20Gaita%20-%20We%20Don%27t%20Talk%20About%20Bruno.mp3",
"mode": "chord"
},
"logs": "ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers\nbuilt with gcc 11 (Ubuntu 11.2.0-19ubuntu1)\nconfiguration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared\nlibavutil 56. 70.100 / 56. 70.100\nlibavcodec 58.134.100 / 58.134.100\nlibavformat 58. 76.100 / 58. 76.100\nlibavdevice 58. 13.100 / 58. 13.100\nlibavfilter 7.110.100 / 7.110.100\nlibswscale 5. 9.100 / 5. 9.100\nlibswresample 3. 9.100 / 3. 9.100\nlibpostproc 55. 9.100 / 55. 9.100\nInput #0, mp3, from '/tmp/tmp1haztl3aCarolina Gaitán - La Gaita - We Don't Talk About Bruno.mp3':\nMetadata:\ntrack : 4/44\ntitle : We Don't Talk About Bruno\nalbum : Encanto (Original Motion Picture Soundtrack)\nencoder : Lavf58.76.100\nartist : Carolina Gaitán - La Gaita, Mauro Castillo, Adassa, Rhenzy Feliz, Diane Guerrero, Stephanie Beatriz, Encanto - Cast\ndisc : 1\ndate : 2021-11-19\nDuration: 00:03:41.38, start: 0.023021, bitrate: 233 kb/s\nStream #0:0: Audio: mp3, 48000 Hz, stereo, fltp, 228 kb/s\nMetadata:\nencoder : Lavc58.13\nStream #0:1: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 640x640 [SAR 600:600 DAR 1:1], 90k tbr, 90k tbn, 90k tbc (attached pic)\nMetadata:\ntitle : Album cover\ncomment : Cover (front)\nStream mapping:\nStream #0:0 -> #0:0 (mp3 (mp3float) -> pcm_s16le (native))\nPress [q] to stop, [?] for help\nOutput #0, wav, to 'cog_temp/tmp1haztl3aCarolina Gaitán - La Gaita - We Don't Talk About Bruno.wav':\nMetadata:\nIPRT : 4/44\nINAM : We Don't Talk About Bruno\nIPRD : Encanto (Original Motion Picture Soundtrack)\nICRD : 2021-11-19\nIART : Carolina Gaitán - La Gaita, Mauro Castillo, Adassa, Rhenzy Feliz, Diane Guerrero, Stephanie Beatriz, Encanto - Cast\ndisc : 1\nISFT : Lavf58.76.100\nStream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s\nMetadata:\nencoder : Lavc58.134.100 pcm_s16le\nsize= 1kB time=00:00:00.00 bitrate=N/A speed= 0x\nsize= 41500kB time=00:03:41.32 bitrate=1536.0kbits/s speed= 938x\nvideo:0kB audio:41500kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000767%\n2023-08-18 06:01:10 Extracting feature\nINFO:Chord Application:Extracting feature\n2023-08-18 06:01:13 Loading model\nINFO:Chord Application:Loading model\n2023-08-18 06:01:13 Using built-in model /src/omnizart/checkpoints/chord/chord_v1 for transcription.\nINFO:Base Class:Using built-in model /src/omnizart/checkpoints/chord/chord_v1 for transcription.\nWARNING:tensorflow:SavedModel saved prior to TF 2.5 detected when loading Keras model. Please ensure that you are saving the model with model.save() or tf.keras.models.save_model(), *NOT* tf.saved_model.save(). To confirm, there should be a file named \"keras_metadata.pb\" in the SavedModel directory.\nWARNING:tensorflow:SavedModel saved prior to TF 2.5 detected when loading Keras model. Please ensure that you are saving the model with model.save() or tf.keras.models.save_model(), *NOT* tf.saved_model.save(). To confirm, there should be a file named \"keras_metadata.pb\" in the SavedModel directory.\nWARNING:absl:Importing a function (__inference_encoder_layer_call_and_return_conditional_losses_19575) with ops with unsaved custom gradients. Will likely fail if a gradient is requested.\nWARNING:absl:Importing a function (__inference_encoder_layer_call_and_return_conditional_losses_21695) with ops with unsaved custom gradients. Will likely fail if a gradient is requested.\nWARNING:absl:Importing a function (__inference_encoder_layer_call_and_return_conditional_losses_76469) with ops with unsaved custom gradients. Will likely fail if a gradient is requested.\nWARNING:absl:Importing a function (__inference_encoder_layer_call_and_return_conditional_losses_74349) with ops with unsaved custom gradients. Will likely fail if a gradient is requested.\nWARNING:absl:Importing a function (__inference_chord_model_layer_call_and_return_conditional_losses_63102) with ops with unsaved custom gradients. Will likely fail if a gradient is requested.\nWARNING:absl:Importing a function (__inference_chord_model_layer_call_and_return_conditional_losses_45289) with ops with unsaved custom gradients. Will likely fail if a gradient is requested.\nWARNING:absl:Importing a function (__inference_chord_model_layer_call_and_return_conditional_losses_71739) with ops with unsaved custom gradients. Will likely fail if a gradient is requested.\nWARNING:absl:Importing a function (__inference_chord_model_layer_call_and_return_conditional_losses_53926) with ops with unsaved custom gradients. Will likely fail if a gradient is requested.\nWARNING:absl:Importing a function (__inference__wrapped_model_17395) with ops with unsaved custom gradients. Will likely fail if a gradient is requested.\nWARNING:tensorflow:No training configuration found in save file, so the model was *not* compiled. Compile it manually.\nWARNING:tensorflow:No training configuration found in save file, so the model was *not* compiled. Compile it manually.\n2023-08-18 06:01:26 Preparing feature for model prediction\nINFO:Chord Application:Preparing feature for model prediction\n2023-08-18 06:01:26 Predicting...\nINFO:Chord Application:Predicting...\n1/2 [==============>...............] - ETA: 1s\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\n2/2 [==============================] - 1s 20ms/step\n2023-08-18 06:01:28 Infering chords...\nINFO:Chord Application:Infering chords...\n2023-08-18 06:01:28 MIDI file has been written to ./tmp1haztl3aCarolina Gaitán - La Gaita - We Don't Talk About Bruno.mid.\nINFO:Base Class:MIDI file has been written to ./tmp1haztl3aCarolina Gaitán - La Gaita - We Don't Talk About Bruno.mid.\n2023-08-18 06:01:28 MIDI and CSV file have been written to /src\nINFO:Chord Application:MIDI and CSV file have been written to /src\n2023-08-18 06:01:28 Transcription finished\nINFO:Chord Application:Transcription finished\nSynthesizing MIDI...\nffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers\nbuilt with gcc 11 (Ubuntu 11.2.0-19ubuntu1)\nconfiguration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared\nlibavutil 56. 70.100 / 56. 70.100\nlibavcodec 58.134.100 / 58.134.100\nlibavformat 58. 76.100 / 58. 76.100\nlibavdevice 58. 13.100 / 58. 13.100\nlibavfilter 7.110.100 / 7.110.100\nlibswscale 5. 9.100 / 5. 9.100\nlibswresample 3. 9.100 / 3. 9.100\nlibpostproc 55. 9.100 / 55. 9.100\nGuessed Channel Layout for Input Stream #0.0 : mono\nInput #0, wav, from 'cog_temp/tmp1haztl3aCarolina Gaitán - La Gaita - We Don't Talk About Bruno_synth.wav':\nDuration: 00:03:34.90, bitrate: 2822 kb/s\nStream #0:0: Audio: pcm_f64le ([3][0][0][0] / 0x0003), 44100 Hz, mono, dbl, 2822 kb/s\nStream mapping:\nStream #0:0 -> #0:0 (pcm_f64le (native) -> mp3 (libmp3lame))\nPress [q] to stop, [?] for help\nOutput #0, mp3, to '/tmp/tmpww3zelat/out.mp3':\nMetadata:\nTSSE : Lavf58.76.100\nStream #0:0: Audio: mp3, 44100 Hz, mono, fltp\nMetadata:\nencoder : Lavc58.134.100 libmp3lame\nsize= 0kB time=00:00:00.00 bitrate=N/A speed= 0x\nsize= 512kB time=00:01:15.23 bitrate= 55.8kbits/s speed= 150x\nsize= 1024kB time=00:02:28.61 bitrate= 56.4kbits/s speed= 149x\nsize= 1679kB time=00:03:34.88 bitrate= 64.0kbits/s speed= 149x\nvideo:0kB audio:1679kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.013202%",
"output": "https://replicate.delivery/pbxt/VeqWYlqBFTWmB6QnbsQLaq4uVDZnilNdtImegu9agIw8sLbRA/out.mp3",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-08-18T06:01:10.038163Z",
"started_at": "2023-08-18T06:01:10.029901Z",
"completed_at": "2023-08-18T06:01:33.303718Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/4hhxdpdbzrlfcs6sgl3aarrhyi/cancel",
"get": "https://api.replicate.com/v1/predictions/4hhxdpdbzrlfcs6sgl3aarrhyi"
},
"metrics": {
"predict_time": 23.273817,
"total_time": 23.265555
}
}