Failed to load versions. Head to the versions page to see all versions for this model.
You're looking at a specific version of this model. Jump to the model overview.
chenxwh /cosyvoice2-0.5b:669b1cd6
Input
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run chenxwh/cosyvoice2-0.5b using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"chenxwh/cosyvoice2-0.5b:669b1cd618f2747d2237350e868f5c313f3b548fc803ca4e57adfaba778b042d",
{
input: {
task: "cross-lingual voice clone",
tts_text: "어떤 것에 강한 감정을 느낀다면, 목소리를 내고 행동해야 합니다. 그것이 제가 사는 철학입니다.",
instruction: "",
source_audio: "https://replicate.delivery/pbxt/MCyrXEXNuJtnKuIm25g3GwmyUFMWpXSfri0RnG46W4Mt1P4b/EN_4_0.wav",
source_transcript: "如果你对某件事情有强烈的感觉,你应该发声并采取行动。这是我生活的哲学。"
}
}
);
// 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=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run chenxwh/cosyvoice2-0.5b using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"chenxwh/cosyvoice2-0.5b:669b1cd618f2747d2237350e868f5c313f3b548fc803ca4e57adfaba778b042d",
input={
"task": "cross-lingual voice clone",
"tts_text": "어떤 것에 강한 감정을 느낀다면, 목소리를 내고 행동해야 합니다. 그것이 제가 사는 철학입니다.",
"instruction": "",
"source_audio": "https://replicate.delivery/pbxt/MCyrXEXNuJtnKuIm25g3GwmyUFMWpXSfri0RnG46W4Mt1P4b/EN_4_0.wav",
"source_transcript": "如果你对某件事情有强烈的感觉,你应该发声并采取行动。这是我生活的哲学。"
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run chenxwh/cosyvoice2-0.5b 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": "chenxwh/cosyvoice2-0.5b:669b1cd618f2747d2237350e868f5c313f3b548fc803ca4e57adfaba778b042d",
"input": {
"task": "cross-lingual voice clone",
"tts_text": "어떤 것에 강한 감정을 느낀다면, 목소리를 내고 행동해야 합니다. 그것이 제가 사는 철학입니다.",
"instruction": "",
"source_audio": "https://replicate.delivery/pbxt/MCyrXEXNuJtnKuIm25g3GwmyUFMWpXSfri0RnG46W4Mt1P4b/EN_4_0.wav",
"source_transcript": "如果你对某件事情有强烈的感觉,你应该发声并采取行动。这是我生活的哲学。"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Add a payment method to run this model.
By signing in, you agree to our
terms of service and privacy policy
Output
- Chapters
- descriptions off, selected
- captions settings, opens captions settings dialog
- captions off, selected
This is a modal window.
Beginning of dialog window. Escape will cancel and close the window.
End of dialog window.
{
"completed_at": "2024-12-26T00:03:49.191698Z",
"created_at": "2024-12-26T00:03:45.645000Z",
"data_removed": false,
"error": null,
"id": "f0hxbt65dnrm80cm013873fx8m",
"input": {
"task": "cross-lingual voice clone",
"tts_text": "어떤 것에 강한 감정을 느낀다면, 목소리를 내고 행동해야 합니다. 그것이 제가 사는 철학입니다.",
"instruction": "",
"source_audio": "https://replicate.delivery/pbxt/MCyrXEXNuJtnKuIm25g3GwmyUFMWpXSfri0RnG46W4Mt1P4b/EN_4_0.wav",
"source_transcript": "如果你对某件事情有强烈的感觉,你应该发声并采取行动。这是我生活的哲学。"
},
"logs": "0%| | 0/1 [00:00<?, ?it/s]2024-12-26 00:03:46,203 INFO synthesis text 어떤 것에 강한 감정을 느낀다면, 목소리를 내고 행동해야 합니다. 그것이 제가 사는 철학입니다.\n2024-12-26 00:03:49,177 INFO yield speech len 8.68, rtf 0.34272687226396553\n100%|██████████| 1/1 [00:03<00:00, 3.37s/it]\n100%|██████████| 1/1 [00:03<00:00, 3.37s/it]",
"metrics": {
"predict_time": 3.539866242,
"total_time": 3.546698
},
"output": "https://replicate.delivery/xezq/UbooyvHijzqVDljvbHf9be6eVJQNxEfQ1HSt77pxHLDU2T6PB/out.wav",
"started_at": "2024-12-26T00:03:45.651832Z",
"status": "succeeded",
"urls": {
"stream": "https://stream.replicate.com/v1/files/bcwr-jfcu4ku34ezbx3xk3u2jqu63n7sr4pzip337zx62icaugx6xiewq",
"get": "https://api.replicate.com/v1/predictions/f0hxbt65dnrm80cm013873fx8m",
"cancel": "https://api.replicate.com/v1/predictions/f0hxbt65dnrm80cm013873fx8m/cancel"
},
"version": "669b1cd618f2747d2237350e868f5c313f3b548fc803ca4e57adfaba778b042d"
}
0%| | 0/1 [00:00<?, ?it/s]2024-12-26 00:03:46,203 INFO synthesis text 어떤 것에 강한 감정을 느낀다면, 목소리를 내고 행동해야 합니다. 그것이 제가 사는 철학입니다.
2024-12-26 00:03:49,177 INFO yield speech len 8.68, rtf 0.34272687226396553
100%|██████████| 1/1 [00:03<00:00, 3.37s/it]
100%|██████████| 1/1 [00:03<00:00, 3.37s/it]