typetext
{
"denoise_ratio": 0,
"input_text": "And lay me down in my cold bed and leave my shining lot.",
"output_sample_rate": 16000,
"scale_output_volume": false,
"target_voice": "https://replicate.delivery/pbxt/K30ke0FQUcGCa4gQdyhEPaEeGvEwDZmEK3SMtXaoujJSMlSE/reference_1.wav",
"text_to_vector_temperature": 0.33,
"voice_conversion_temperature": 0.33
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_0iD**********************************
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 adirik/hierspeechpp using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"adirik/hierspeechpp:4e41ecdd0a844297efc19ba17688ddc1096f8d83dead8a9190df665462e58ff0",
{
input: {
denoise_ratio: 0,
input_text: "And lay me down in my cold bed and leave my shining lot.",
output_sample_rate: 16000,
scale_output_volume: false,
target_voice: "https://replicate.delivery/pbxt/K30ke0FQUcGCa4gQdyhEPaEeGvEwDZmEK3SMtXaoujJSMlSE/reference_1.wav",
text_to_vector_temperature: 0.33,
voice_conversion_temperature: 0.33
}
}
);
// 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_0iD**********************************
This is your API token. Keep it to yourself.
import replicate
Run adirik/hierspeechpp using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"adirik/hierspeechpp:4e41ecdd0a844297efc19ba17688ddc1096f8d83dead8a9190df665462e58ff0",
input={
"denoise_ratio": 0,
"input_text": "And lay me down in my cold bed and leave my shining lot.",
"output_sample_rate": 16000,
"scale_output_volume": False,
"target_voice": "https://replicate.delivery/pbxt/K30ke0FQUcGCa4gQdyhEPaEeGvEwDZmEK3SMtXaoujJSMlSE/reference_1.wav",
"text_to_vector_temperature": 0.33,
"voice_conversion_temperature": 0.33
}
)
# 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_0iD**********************************
This is your API token. Keep it to yourself.
Run adirik/hierspeechpp 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": "adirik/hierspeechpp:4e41ecdd0a844297efc19ba17688ddc1096f8d83dead8a9190df665462e58ff0",
"input": {
"denoise_ratio": 0,
"input_text": "And lay me down in my cold bed and leave my shining lot.",
"output_sample_rate": 16000,
"scale_output_volume": false,
"target_voice": "https://replicate.delivery/pbxt/K30ke0FQUcGCa4gQdyhEPaEeGvEwDZmEK3SMtXaoujJSMlSE/reference_1.wav",
"text_to_vector_temperature": 0.33,
"voice_conversion_temperature": 0.33
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "33q5wgdbmgi6wnlkohidsi5o34",
"model": "adirik/hierspeechpp",
"version": "4e41ecdd0a844297efc19ba17688ddc1096f8d83dead8a9190df665462e58ff0",
"input": {
"denoise_ratio": 0,
"input_text": "And lay me down in my cold bed and leave my shining lot.",
"output_sample_rate": 16000,
"scale_output_volume": false,
"target_voice": "https://replicate.delivery/pbxt/K30ke0FQUcGCa4gQdyhEPaEeGvEwDZmEK3SMtXaoujJSMlSE/reference_1.wav",
"text_to_vector_temperature": 0.33,
"voice_conversion_temperature": 0.33
},
"logs": "",
"output": "https://replicate.delivery/pbxt/u3lKswvUul4zBdUe6WOZMz4TBrh5qmD4Sex4LT7hGwrtqLCSA/output.wav",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-12-14T13:51:11.336335Z",
"started_at": "2023-12-14T13:52:43.743671Z",
"completed_at": "2023-12-14T13:52:46.93799Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/33q5wgdbmgi6wnlkohidsi5o34/cancel",
"get": "https://api.replicate.com/v1/predictions/33q5wgdbmgi6wnlkohidsi5o34"
},
"metrics": {
"predict_time": 3.194319,
"total_time": 95.601655
}
}