typeenum
value typestring
optionsen, de, es, it, ja, pl, pt, tr
{
"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_cQc**********************************
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/bark_small using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"ttsds/bark_small:e0e4df86d3dd484bcb7b693077929005d4222d1bbdccf7afed3eccee06b0bbea",
{
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_cQc**********************************
This is your API token. Keep it to yourself.
import replicate
Run ttsds/bark_small using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"ttsds/bark_small:e0e4df86d3dd484bcb7b693077929005d4222d1bbdccf7afed3eccee06b0bbea",
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_cQc**********************************
This is your API token. Keep it to yourself.
Run ttsds/bark_small 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/bark_small:e0e4df86d3dd484bcb7b693077929005d4222d1bbdccf7afed3eccee06b0bbea",
"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": "5gq40x1wznrm80cmmxrt9ahprw",
"model": "ttsds/bark_small",
"version": "e0e4df86d3dd484bcb7b693077929005d4222d1bbdccf7afed3eccee06b0bbea",
"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": "Extracting semantics...\nTokenizing semantics...\nCreating coarse and fine prompts...\n 0%| | 0/768 [00:00<?, ?it/s]\n 0%| | 1/768 [00:00<02:24, 5.30it/s]\n 7%|▋ | 51/768 [00:00<00:03, 216.88it/s]\n 13%|█▎ | 101/768 [00:00<00:02, 323.91it/s]\n 20%|█▉ | 152/768 [00:00<00:01, 387.07it/s]\n 26%|██▋ | 202/768 [00:00<00:01, 422.59it/s]\n 33%|███▎ | 252/768 [00:00<00:01, 445.04it/s]\n 39%|███▉ | 303/768 [00:00<00:01, 462.92it/s]\n 46%|████▌ | 354/768 [00:00<00:00, 474.85it/s]\n 53%|█████▎ | 404/768 [00:00<00:00, 482.02it/s]\n 59%|█████▉ | 455/768 [00:01<00:00, 487.87it/s]\n 66%|██████▌ | 506/768 [00:01<00:00, 493.62it/s]\n 73%|███████▎ | 557/768 [00:01<00:00, 496.55it/s]\n100%|██████████| 594/594 [00:01<00:00, 496.55it/s]\n100%|██████████| 594/594 [00:01<00:00, 431.53it/s]\n 0%| | 0/30 [00:00<?, ?it/s]\n 3%|▎ | 1/30 [00:00<00:03, 7.93it/s]\n 7%|▋ | 2/30 [00:00<00:03, 8.30it/s]\n 10%|█ | 3/30 [00:00<00:03, 8.45it/s]\n 13%|█▎ | 4/30 [00:00<00:03, 8.54it/s]\n 17%|█▋ | 5/30 [00:00<00:02, 8.59it/s]\n 20%|██ | 6/30 [00:00<00:02, 8.59it/s]\n 23%|██▎ | 7/30 [00:00<00:02, 8.64it/s]\n 27%|██▋ | 8/30 [00:00<00:02, 8.67it/s]\n 30%|███ | 9/30 [00:01<00:02, 8.70it/s]\n 33%|███▎ | 10/30 [00:01<00:02, 8.72it/s]\n 37%|███▋ | 11/30 [00:01<00:02, 8.73it/s]\n 40%|████ | 12/30 [00:01<00:02, 8.73it/s]\n 43%|████▎ | 13/30 [00:01<00:01, 8.74it/s]\n 47%|████▋ | 14/30 [00:01<00:01, 8.73it/s]\n 50%|█████ | 15/30 [00:01<00:01, 8.73it/s]\n 53%|█████▎ | 16/30 [00:01<00:01, 8.74it/s]\n 57%|█████▋ | 17/30 [00:01<00:01, 8.75it/s]\n 60%|██████ | 18/30 [00:02<00:01, 8.75it/s]\n 63%|██████▎ | 19/30 [00:02<00:01, 8.75it/s]\n 67%|██████▋ | 20/30 [00:02<00:01, 8.69it/s]\n 70%|███████ | 21/30 [00:02<00:01, 8.70it/s]\n 73%|███████▎ | 22/30 [00:02<00:00, 8.72it/s]\n 77%|███████▋ | 23/30 [00:02<00:00, 8.73it/s]\n 80%|████████ | 24/30 [00:02<00:00, 8.74it/s]\n 83%|████████▎ | 25/30 [00:02<00:00, 8.70it/s]\n 87%|████████▋ | 26/30 [00:02<00:00, 8.72it/s]\n 90%|█████████ | 27/30 [00:03<00:00, 8.71it/s]\n 93%|█████████▎| 28/30 [00:03<00:00, 8.67it/s]\n 97%|█████████▋| 29/30 [00:03<00:00, 8.69it/s]\n100%|██████████| 30/30 [00:03<00:00, 8.76it/s]",
"output": "https://replicate.delivery/xezq/WOBvQ5Q2JlLvJhj1Erj7RUvpq585eQnFCbe31ZYgvMLEtRJUA/test_pred.wav",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-01-27T11:06:43.837Z",
"started_at": "2025-01-27T11:08:46.993821Z",
"completed_at": "2025-01-27T11:08:52.457579Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/5gq40x1wznrm80cmmxrt9ahprw/cancel",
"get": "https://api.replicate.com/v1/predictions/5gq40x1wznrm80cmmxrt9ahprw",
"stream": "https://stream.replicate.com/v1/files/bsvm-3iproag4scqrqdwypbylyhpjd7z6shcm6f6p32sktzqokxd2cufq",
"web": "https://replicate.com/p/5gq40x1wznrm80cmmxrt9ahprw"
},
"metrics": {
"predict_time": 5.463757617,
"total_time": 128.620579
}
}