typefile
{
"input": "https://replicate.delivery/pbxt/JAmpe8J6WAi5YUdXxxatYFU9ZfKKANtSSBfxHjjdbdaMwyXT/demo.wav"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_IKc**********************************
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 lucataco/wsrglow using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"lucataco/wsrglow:56ffe617ab2157bd7a43156860529c83abbe862e2f4fd64263d217d2efac34c1",
{
input: {
input: "https://replicate.delivery/pbxt/JAmpe8J6WAi5YUdXxxatYFU9ZfKKANtSSBfxHjjdbdaMwyXT/demo.wav"
}
}
);
// 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_IKc**********************************
This is your API token. Keep it to yourself.
import replicate
Run lucataco/wsrglow using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"lucataco/wsrglow:56ffe617ab2157bd7a43156860529c83abbe862e2f4fd64263d217d2efac34c1",
input={
"input": "https://replicate.delivery/pbxt/JAmpe8J6WAi5YUdXxxatYFU9ZfKKANtSSBfxHjjdbdaMwyXT/demo.wav"
}
)
# 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_IKc**********************************
This is your API token. Keep it to yourself.
Run lucataco/wsrglow 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": "lucataco/wsrglow:56ffe617ab2157bd7a43156860529c83abbe862e2f4fd64263d217d2efac34c1",
"input": {
"input": "https://replicate.delivery/pbxt/JAmpe8J6WAi5YUdXxxatYFU9ZfKKANtSSBfxHjjdbdaMwyXT/demo.wav"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "w4gjiczbwomix7uz33bynaa55i",
"model": "lucataco/wsrglow",
"version": "56ffe617ab2157bd7a43156860529c83abbe862e2f4fd64263d217d2efac34c1",
"input": {
"input": "https://replicate.delivery/pbxt/JAmpe8J6WAi5YUdXxxatYFU9ZfKKANtSSBfxHjjdbdaMwyXT/demo.wav"
},
"logs": "Loading wav file...\n(49237,) 24000 48000\nsampling rate (lr) = 24000\nlr.shape = (49408,)\nRunning prediction...\n(49408,) (98816,)\nsampling rate = 48000",
"output": "https://replicate.delivery/pbxt/2nfO3xDWfouDmE7wfdC7euwvFzHHez8mfuDlgWjRPdwL1V9TE/out.wav",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-07-14T19:31:11.212653Z",
"started_at": "2023-07-14T19:36:50.202461Z",
"completed_at": "2023-07-14T19:36:52.502681Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/w4gjiczbwomix7uz33bynaa55i/cancel",
"get": "https://api.replicate.com/v1/predictions/w4gjiczbwomix7uz33bynaa55i"
},
"metrics": {
"predict_time": 2.30022,
"total_time": 341.290028
}
}