typetext
{
"language": "en",
"speaker_reference": "https://replicate.delivery/pbxt/MNFXdPaUPOwYCZjZM4azsymbzE2TCV2WJXfGpeV2DrFWaSq8/example_en.wav",
"text": "With tenure, Suzie'd have all the more leisure for yachting, but her publications are no good."
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_GiB**********************************
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 ttsds/xtts_1 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"ttsds/xtts_1:07975507be88788e145bad10f6f20bfbec7924ee8fae068b1e7eedb16821f51f",
{
input: {
language: "en",
speaker_reference: "https://replicate.delivery/pbxt/MNFXdPaUPOwYCZjZM4azsymbzE2TCV2WJXfGpeV2DrFWaSq8/example_en.wav",
text: "With tenure, Suzie'd have all the more leisure for yachting, but her publications are no good."
}
}
);
// 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_GiB**********************************
This is your API token. Keep it to yourself.
import replicate
Run ttsds/xtts_1 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"ttsds/xtts_1:07975507be88788e145bad10f6f20bfbec7924ee8fae068b1e7eedb16821f51f",
input={
"language": "en",
"speaker_reference": "https://replicate.delivery/pbxt/MNFXdPaUPOwYCZjZM4azsymbzE2TCV2WJXfGpeV2DrFWaSq8/example_en.wav",
"text": "With tenure, Suzie'd have all the more leisure for yachting, but her publications are no good."
}
)
# 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_GiB**********************************
This is your API token. Keep it to yourself.
Run ttsds/xtts_1 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": "ttsds/xtts_1:07975507be88788e145bad10f6f20bfbec7924ee8fae068b1e7eedb16821f51f",
"input": {
"language": "en",
"speaker_reference": "https://replicate.delivery/pbxt/MNFXdPaUPOwYCZjZM4azsymbzE2TCV2WJXfGpeV2DrFWaSq8/example_en.wav",
"text": "With tenure, Suzie\'d have all the more leisure for yachting, but her publications are no good."
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "p4fqqyn889rj40cna72se145z4",
"model": "ttsds/xtts_1",
"version": "07975507be88788e145bad10f6f20bfbec7924ee8fae068b1e7eedb16821f51f",
"input": {
"language": "en",
"speaker_reference": "https://replicate.delivery/pbxt/MNFXdPaUPOwYCZjZM4azsymbzE2TCV2WJXfGpeV2DrFWaSq8/example_en.wav",
"text": "With tenure, Suzie'd have all the more leisure for yachting, but her publications are no good."
},
"logs": "",
"output": "https://replicate.delivery/yhqm/XrOzxE1WkuaRC5nAYPSlqMJf0cQxvXlpMgyCSTIDtMkGsFKKA/output.wav",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-03-01T12:54:23.042Z",
"started_at": "2025-03-01T12:56:42.996736Z",
"completed_at": "2025-03-01T12:56:45.461569Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/p4fqqyn889rj40cna72se145z4/cancel",
"get": "https://api.replicate.com/v1/predictions/p4fqqyn889rj40cna72se145z4",
"stream": "https://stream.replicate.com/v1/files/yswh-kno7e2bhwpwolna67ynoh7kru5nagry2ficswsiaqz3mqxj4abiq",
"web": "https://replicate.com/p/p4fqqyn889rj40cna72se145z4"
},
"metrics": {
"predict_time": 2.464833546,
"total_time": 142.419569
}
}