typefile
{
"ddim_steps": 50,
"guidance_scale": 3.5,
"input_file": "https://replicate.delivery/pbxt/JYv70XQsiZBbSmknfMhGoEb4QYbuyJ9hJkfgjyzCvh4TzPmT/music.wav",
"seed": 42
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_CDQ**********************************
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 nateraw/audio-super-resolution using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"nateraw/audio-super-resolution:9c3d3e39fb0cb6aea677264881d8073f835336137b39fdea4e94093319379535",
{
input: {
ddim_steps: 50,
guidance_scale: 3.5,
input_file: "https://replicate.delivery/pbxt/JYv70XQsiZBbSmknfMhGoEb4QYbuyJ9hJkfgjyzCvh4TzPmT/music.wav",
seed: 42
}
}
);
// 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_CDQ**********************************
This is your API token. Keep it to yourself.
import replicate
Run nateraw/audio-super-resolution using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"nateraw/audio-super-resolution:9c3d3e39fb0cb6aea677264881d8073f835336137b39fdea4e94093319379535",
input={
"ddim_steps": 50,
"guidance_scale": 3.5,
"input_file": "https://replicate.delivery/pbxt/JYv70XQsiZBbSmknfMhGoEb4QYbuyJ9hJkfgjyzCvh4TzPmT/music.wav",
"seed": 42
}
)
# 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_CDQ**********************************
This is your API token. Keep it to yourself.
Run nateraw/audio-super-resolution 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": "nateraw/audio-super-resolution:9c3d3e39fb0cb6aea677264881d8073f835336137b39fdea4e94093319379535",
"input": {
"ddim_steps": 50,
"guidance_scale": 3.5,
"input_file": "https://replicate.delivery/pbxt/JYv70XQsiZBbSmknfMhGoEb4QYbuyJ9hJkfgjyzCvh4TzPmT/music.wav",
"seed": 42
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "qqynzilbxm2t5h6eaywx2p7g54",
"model": "nateraw/audio-super-resolution",
"version": "9c3d3e39fb0cb6aea677264881d8073f835336137b39fdea4e94093319379535",
"input": {
"ddim_steps": 50,
"guidance_scale": 3.5,
"input_file": "https://replicate.delivery/pbxt/JYv70XQsiZBbSmknfMhGoEb4QYbuyJ9hJkfgjyzCvh4TzPmT/music.wav",
"seed": 42
},
"logs": "\u001b[93m Warning: audio is longer than 10.24 seconds, may degrade the model performance. It's recommand to truncate your audio to 5.12 seconds before input to AudioSR to get the best performance.\u001b[00m\n/src/audiosr/utils.py:109: FutureWarning: Pass sr=48000, n_fft=2048, n_mels=256, fmin=20, fmax=24000 as keyword args. From version 0.10 passing these as positional arguments will result in an error\nmel = librosa_mel_fn(sampling_rate, filter_length, n_mel, mel_fmin, mel_fmax)\nRunning DDIM Sampling with 50 timesteps\nDDIM Sampler: 0%| | 0/50 [00:00<?, ?it/s]\nDDIM Sampler: 2%|▏ | 1/50 [00:06<05:20, 6.54s/it]\nDDIM Sampler: 4%|▍ | 2/50 [00:06<02:14, 2.80s/it]\nDDIM Sampler: 6%|▌ | 3/50 [00:06<01:15, 1.60s/it]\nDDIM Sampler: 8%|▊ | 4/50 [00:07<00:47, 1.04s/it]\nDDIM Sampler: 10%|█ | 5/50 [00:07<00:32, 1.37it/s]\nDDIM Sampler: 12%|█▏ | 6/50 [00:07<00:23, 1.84it/s]\nDDIM Sampler: 14%|█▍ | 7/50 [00:07<00:18, 2.36it/s]\nDDIM Sampler: 16%|█▌ | 8/50 [00:07<00:14, 2.89it/s]\nDDIM Sampler: 18%|█▊ | 9/50 [00:07<00:12, 3.40it/s]\nDDIM Sampler: 20%|██ | 10/50 [00:08<00:10, 3.86it/s]\nDDIM Sampler: 22%|██▏ | 11/50 [00:08<00:09, 4.26it/s]\nDDIM Sampler: 24%|██▍ | 12/50 [00:08<00:08, 4.59it/s]\nDDIM Sampler: 26%|██▌ | 13/50 [00:08<00:07, 4.85it/s]\nDDIM Sampler: 28%|██▊ | 14/50 [00:08<00:07, 5.04it/s]\nDDIM Sampler: 30%|███ | 15/50 [00:09<00:06, 5.19it/s]\nDDIM Sampler: 32%|███▏ | 16/50 [00:09<00:06, 5.29it/s]\nDDIM Sampler: 34%|███▍ | 17/50 [00:09<00:06, 5.37it/s]\nDDIM Sampler: 36%|███▌ | 18/50 [00:09<00:05, 5.42it/s]\nDDIM Sampler: 38%|███▊ | 19/50 [00:09<00:05, 5.46it/s]\nDDIM Sampler: 40%|████ | 20/50 [00:09<00:05, 5.49it/s]\nDDIM Sampler: 42%|████▏ | 21/50 [00:10<00:05, 5.51it/s]\nDDIM Sampler: 44%|████▍ | 22/50 [00:10<00:05, 5.53it/s]\nDDIM Sampler: 46%|████▌ | 23/50 [00:10<00:04, 5.54it/s]\nDDIM Sampler: 48%|████▊ | 24/50 [00:10<00:04, 5.55it/s]\nDDIM Sampler: 50%|█████ | 25/50 [00:10<00:04, 5.55it/s]\nDDIM Sampler: 52%|█████▏ | 26/50 [00:11<00:04, 5.56it/s]\nDDIM Sampler: 54%|█████▍ | 27/50 [00:11<00:04, 5.56it/s]\nDDIM Sampler: 56%|█████▌ | 28/50 [00:11<00:03, 5.56it/s]\nDDIM Sampler: 58%|█████▊ | 29/50 [00:11<00:03, 5.56it/s]\nDDIM Sampler: 60%|██████ | 30/50 [00:11<00:03, 5.56it/s]\nDDIM Sampler: 62%|██████▏ | 31/50 [00:11<00:03, 5.56it/s]\nDDIM Sampler: 64%|██████▍ | 32/50 [00:12<00:03, 5.48it/s]\nDDIM Sampler: 66%|██████▌ | 33/50 [00:12<00:03, 5.50it/s]\nDDIM Sampler: 68%|██████▊ | 34/50 [00:12<00:02, 5.44it/s]\nDDIM Sampler: 70%|███████ | 35/50 [00:12<00:02, 5.23it/s]\nDDIM Sampler: 72%|███████▏ | 36/50 [00:12<00:02, 5.08it/s]\nDDIM Sampler: 74%|███████▍ | 37/50 [00:13<00:02, 4.99it/s]\nDDIM Sampler: 76%|███████▌ | 38/50 [00:13<00:02, 4.85it/s]\nDDIM Sampler: 78%|███████▊ | 39/50 [00:13<00:02, 4.74it/s]\nDDIM Sampler: 80%|████████ | 40/50 [00:13<00:02, 4.71it/s]\nDDIM Sampler: 82%|████████▏ | 41/50 [00:13<00:01, 4.69it/s]\nDDIM Sampler: 84%|████████▍ | 42/50 [00:14<00:01, 4.68it/s]\nDDIM Sampler: 86%|████████▌ | 43/50 [00:14<00:01, 4.68it/s]\nDDIM Sampler: 88%|████████▊ | 44/50 [00:14<00:01, 4.81it/s]\nDDIM Sampler: 90%|█████████ | 45/50 [00:14<00:00, 5.01it/s]\nDDIM Sampler: 92%|█████████▏| 46/50 [00:14<00:00, 5.16it/s]\nDDIM Sampler: 94%|█████████▍| 47/50 [00:15<00:00, 5.28it/s]\nDDIM Sampler: 96%|█████████▌| 48/50 [00:15<00:00, 5.36it/s]\nDDIM Sampler: 98%|█████████▊| 49/50 [00:15<00:00, 5.42it/s]\nDDIM Sampler: 100%|██████████| 50/50 [00:15<00:00, 5.46it/s]\nDDIM Sampler: 100%|██████████| 50/50 [00:15<00:00, 3.19it/s]",
"output": "https://pbxt.replicate.delivery/73xEQwFed8UXSCQpBJuLYgg8ym0vjp2nSidaqWKwcxhUvHzIA/out.wav",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-09-20T19:17:04.700648Z",
"started_at": "2023-09-20T19:18:33.274001Z",
"completed_at": "2023-09-20T19:19:06.183902Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/qqynzilbxm2t5h6eaywx2p7g54/cancel",
"get": "https://api.replicate.com/v1/predictions/qqynzilbxm2t5h6eaywx2p7g54"
},
"metrics": {
"predict_time": 32.909901,
"total_time": 121.483254
}
}