typeenum
value typestring
optionsen, zh, de, fr, ja, ko
{
"language": "zh",
"speaker_reference": "https://replicate.delivery/pbxt/MNFaIYg8V1De4DNKRWAtKV5RTFiuF5SvIhYgO984g4vygwW7/example_zh.wav",
"text": "张飞爱吃包子,李白游览华山,奇珍异兽满山坡。"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_Nr4**********************************
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/amphion_vevo using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"ttsds/amphion_vevo:4a4e9e65d19de3236d6fb78c875a782b10a5cf37520a22654385606c10c1ecf7",
{
input: {
language: "zh",
speaker_reference: "https://replicate.delivery/pbxt/MNFaIYg8V1De4DNKRWAtKV5RTFiuF5SvIhYgO984g4vygwW7/example_zh.wav",
text: "张飞爱吃包子,李白游览华山,奇珍异兽满山坡。"
}
}
);
// 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_Nr4**********************************
This is your API token. Keep it to yourself.
import replicate
Run ttsds/amphion_vevo using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"ttsds/amphion_vevo:4a4e9e65d19de3236d6fb78c875a782b10a5cf37520a22654385606c10c1ecf7",
input={
"language": "zh",
"speaker_reference": "https://replicate.delivery/pbxt/MNFaIYg8V1De4DNKRWAtKV5RTFiuF5SvIhYgO984g4vygwW7/example_zh.wav",
"text": "张飞爱吃包子,李白游览华山,奇珍异兽满山坡。"
}
)
# 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_Nr4**********************************
This is your API token. Keep it to yourself.
Run ttsds/amphion_vevo 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/amphion_vevo:4a4e9e65d19de3236d6fb78c875a782b10a5cf37520a22654385606c10c1ecf7",
"input": {
"language": "zh",
"speaker_reference": "https://replicate.delivery/pbxt/MNFaIYg8V1De4DNKRWAtKV5RTFiuF5SvIhYgO984g4vygwW7/example_zh.wav",
"text": "张飞爱吃包子,李白游览华山,奇珍异兽满山坡。"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "c7eprj7rwxrme0cmjn2tegvqxm",
"model": "ttsds/amphion_vevo",
"version": "4a4e9e65d19de3236d6fb78c875a782b10a5cf37520a22654385606c10c1ecf7",
"input": {
"language": "zh",
"speaker_reference": "https://replicate.delivery/pbxt/MNFaIYg8V1De4DNKRWAtKV5RTFiuF5SvIhYgO984g4vygwW7/example_zh.wav",
"text": "张飞爱吃包子,李白游览华山,奇珍异兽满山坡。"
},
"logs": "Building prefix dict from the default dictionary ...\nDumping model to file cache /tmp/jieba.cache\nLoading model cost 0.389 seconds.\nPrefix dict has been built successfully.\n/Amphion/./models/tts/maskgct/g2p/g2p/chinese_model_g2p.py:100: UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at ../torch/csrc/utils/tensor_new.cpp:245.)\nbatch_label_starts = torch.tensor(batch_label_starts, dtype=torch.long)",
"output": "https://replicate.delivery/xezq/BPdpseEYzej8GkoPg2o7pesq53WWzdjl2lmWCLETwY8agOQoA/test_pred.wav",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-01-23T22:26:18.471Z",
"started_at": "2025-01-23T22:26:18.477461Z",
"completed_at": "2025-01-23T22:26:21.033448Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/c7eprj7rwxrme0cmjn2tegvqxm/cancel",
"get": "https://api.replicate.com/v1/predictions/c7eprj7rwxrme0cmjn2tegvqxm",
"stream": "https://stream.replicate.com/v1/files/bsvm-kapkpmvybwfm5srnsvikfz7tc3hz3j22cjybm3fmv5pbtnf35fva",
"web": "https://replicate.com/p/c7eprj7rwxrme0cmjn2tegvqxm"
},
"metrics": {
"predict_time": 2.555987054,
"total_time": 2.562448
}
}