typefile
{
"denoise_flag": false,
"input_audio": "https://replicate.delivery/pbxt/K3Cc2kDFjhUBZT1wrMgR17AIAINzFTeJtn3jGc2LLyfhYbgl/Feynman_%20Knowing%20versus%20Understanding-demo.mp3",
"number_function_evaluations": 64,
"prior_temperature": 0.5,
"solver": "Midpoint"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_Lxj**********************************
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 resemble-ai/resemble-enhance using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"resemble-ai/resemble-enhance:93266a7e7f5805fb79bcf213b1a4e0ef2e45aff3c06eefd96c59e850c87fd6a2",
{
input: {
denoise_flag: false,
input_audio: "https://replicate.delivery/pbxt/K3Cc2kDFjhUBZT1wrMgR17AIAINzFTeJtn3jGc2LLyfhYbgl/Feynman_%20Knowing%20versus%20Understanding-demo.mp3",
number_function_evaluations: 64,
prior_temperature: 0.5,
solver: "Midpoint"
}
}
);
// To access the file URL:
console.log(output[0].url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", output[0]);
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_Lxj**********************************
This is your API token. Keep it to yourself.
import replicate
Run resemble-ai/resemble-enhance using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"resemble-ai/resemble-enhance:93266a7e7f5805fb79bcf213b1a4e0ef2e45aff3c06eefd96c59e850c87fd6a2",
input={
"denoise_flag": False,
"input_audio": "https://replicate.delivery/pbxt/K3Cc2kDFjhUBZT1wrMgR17AIAINzFTeJtn3jGc2LLyfhYbgl/Feynman_%20Knowing%20versus%20Understanding-demo.mp3",
"number_function_evaluations": 64,
"prior_temperature": 0.5,
"solver": "Midpoint"
}
)
# To access the file URL:
print(output[0].url())
#=> "http://example.com"
# To write the file to disk:
with open("my-image.png", "wb") as file:
file.write(output[0].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_Lxj**********************************
This is your API token. Keep it to yourself.
Run resemble-ai/resemble-enhance 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": "resemble-ai/resemble-enhance:93266a7e7f5805fb79bcf213b1a4e0ef2e45aff3c06eefd96c59e850c87fd6a2",
"input": {
"denoise_flag": false,
"input_audio": "https://replicate.delivery/pbxt/K3Cc2kDFjhUBZT1wrMgR17AIAINzFTeJtn3jGc2LLyfhYbgl/Feynman_%20Knowing%20versus%20Understanding-demo.mp3",
"number_function_evaluations": 64,
"prior_temperature": 0.5,
"solver": "Midpoint"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "nkcyehbb46g757pda6uuf53tva",
"model": "resemble-ai/resemble-enhance",
"version": "93266a7e7f5805fb79bcf213b1a4e0ef2e45aff3c06eefd96c59e850c87fd6a2",
"input": {
"denoise_flag": false,
"input_audio": "https://replicate.delivery/pbxt/K3Cc2kDFjhUBZT1wrMgR17AIAINzFTeJtn3jGc2LLyfhYbgl/Feynman_%20Knowing%20versus%20Understanding-demo.mp3",
"number_function_evaluations": 64,
"prior_temperature": 0.5,
"solver": "Midpoint"
},
"logs": "Already up to date.\n 0%| | 0/1 [00:00<?, ?it/s]\n100%|██████████| 1/1 [00:02<00:00, 2.89s/it]\n100%|██████████| 1/1 [00:02<00:00, 2.89s/it]\n 0%| | 0/1 [00:00<?, ?it/s]\n100%|██████████| 1/1 [00:10<00:00, 10.02s/it]\n100%|██████████| 1/1 [00:10<00:00, 10.02s/it]",
"output": [
"https://replicate.delivery/pbxt/62gULs0nLkolM9qchlvJMPKbN5t6hxBlKdiUGgSPoOj4wlgE/output-denoised.wav",
"https://replicate.delivery/pbxt/Snm544flaJUrdain57ew9TzuramM4AdfyEqzS8sxVrJGHuEkA/output-enhanced.wav"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-12-15T02:47:16.598637Z",
"started_at": "2023-12-15T02:49:48.939434Z",
"completed_at": "2023-12-15T02:50:11.95492Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/nkcyehbb46g757pda6uuf53tva/cancel",
"get": "https://api.replicate.com/v1/predictions/nkcyehbb46g757pda6uuf53tva"
},
"metrics": {
"predict_time": 23.015486,
"total_time": 175.356283
}
}