You're looking at a specific version of this model. Jump to the model overview.
Input
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run chenxwh/openvoice using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"chenxwh/openvoice:002cf9fb1ac44f6a172c4ceb868df704a414a8346ac0296310a2d1207226d3a2",
{
input: {
text: "这次旅行我们计划去巴黎欣赏埃菲尔铁塔和卢浮宫的美景",
audio: "https://replicate.delivery/pbxt/KpKA3E3rxf1iTgrvipsYfzQ7K3PhD6NiuCavVn5BBAMiL6wZ/example_reference.mp3",
speed: 1,
language: "ZH"
}
}
);
console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
REPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run chenxwh/openvoice using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"chenxwh/openvoice:002cf9fb1ac44f6a172c4ceb868df704a414a8346ac0296310a2d1207226d3a2",
input={
"text": "这次旅行我们计划去巴黎欣赏埃菲尔铁塔和卢浮宫的美景",
"audio": "https://replicate.delivery/pbxt/KpKA3E3rxf1iTgrvipsYfzQ7K3PhD6NiuCavVn5BBAMiL6wZ/example_reference.mp3",
"speed": 1,
"language": "ZH"
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run chenxwh/openvoice 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": "002cf9fb1ac44f6a172c4ceb868df704a414a8346ac0296310a2d1207226d3a2",
"input": {
"text": "这次旅行我们计划去巴黎欣赏埃菲尔铁塔和卢浮宫的美景",
"audio": "https://replicate.delivery/pbxt/KpKA3E3rxf1iTgrvipsYfzQ7K3PhD6NiuCavVn5BBAMiL6wZ/example_reference.mp3",
"speed": 1,
"language": "ZH"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
brew install cog
If you don’t have Homebrew, there are other installation options available.
Pull and run chenxwh/openvoice using Cog (this will download the full model and run it in your local environment):
cog predict r8.im/cjwbw/openvoice@sha256:002cf9fb1ac44f6a172c4ceb868df704a414a8346ac0296310a2d1207226d3a2 \
-i 'text="这次旅行我们计划去巴黎欣赏埃菲尔铁塔和卢浮宫的美景"' \
-i 'audio="https://replicate.delivery/pbxt/KpKA3E3rxf1iTgrvipsYfzQ7K3PhD6NiuCavVn5BBAMiL6wZ/example_reference.mp3"' \
-i 'speed=1' \
-i 'language="ZH"'
To learn more, take a look at the Cog documentation.
Pull and run chenxwh/openvoice using Docker (this will download the full model and run it in your local environment):
docker run -d -p 5000:5000 --gpus=all r8.im/cjwbw/openvoice@sha256:002cf9fb1ac44f6a172c4ceb868df704a414a8346ac0296310a2d1207226d3a2
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "text": "这次旅行我们计划去巴黎欣赏埃菲尔铁塔和卢浮宫的美景", "audio": "https://replicate.delivery/pbxt/KpKA3E3rxf1iTgrvipsYfzQ7K3PhD6NiuCavVn5BBAMiL6wZ/example_reference.mp3", "speed": 1, "language": "ZH" } }' \ http://localhost:5000/predictions
Add a payment method to run this model.
Each run costs approximately $0.0086. Alternatively, try out our featured models for free.
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-04-28T16:29:39.624105Z",
"created_at": "2024-04-28T16:29:25.103000Z",
"data_removed": false,
"error": null,
"id": "0qb082sjxxrgm0cf4p5ad8r2xr",
"input": {
"text": "这次旅行我们计划去巴黎欣赏埃菲尔铁塔和卢浮宫的美景",
"audio": "https://replicate.delivery/pbxt/KpKA3E3rxf1iTgrvipsYfzQ7K3PhD6NiuCavVn5BBAMiL6wZ/example_reference.mp3",
"speed": 1,
"language": "ZH"
},
"logs": "OpenVoice version: v2\n> Text split to sentences.\n这次旅行我们计划去巴黎欣赏埃菲尔铁塔和卢浮宫的美景\n> ===========================\n0%| | 0/1 [00:00<?, ?it/s]Building prefix dict from the default dictionary ...\nDumping model to file cache /tmp/jieba.cache\nLoading model cost 0.624 seconds.\nPrefix dict has been built successfully.\nSome weights of the model checkpoint at bert-base-multilingual-uncased were not used when initializing BertForMaskedLM: ['cls.seq_relationship.weight', 'cls.seq_relationship.bias']\n- This IS expected if you are initializing BertForMaskedLM from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).\n- This IS NOT expected if you are initializing BertForMaskedLM from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).\n100%|██████████| 1/1 [00:06<00:00, 6.32s/it]\n100%|██████████| 1/1 [00:06<00:00, 6.32s/it]",
"metrics": {
"predict_time": 14.482925,
"total_time": 14.521105
},
"output": "https://replicate.delivery/pbxt/hEAqkV4DVe0qTCYFqCtolCB0SPV2nEhbO6BzS8eYbGXytCvSA/out.wav",
"started_at": "2024-04-28T16:29:25.141180Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/0qb082sjxxrgm0cf4p5ad8r2xr",
"cancel": "https://api.replicate.com/v1/predictions/0qb082sjxxrgm0cf4p5ad8r2xr/cancel"
},
"version": "002cf9fb1ac44f6a172c4ceb868df704a414a8346ac0296310a2d1207226d3a2"
}
OpenVoice version: v2
> Text split to sentences.
这次旅行我们计划去巴黎欣赏埃菲尔铁塔和卢浮宫的美景
> ===========================
0%| | 0/1 [00:00<?, ?it/s]Building prefix dict from the default dictionary ...
Dumping model to file cache /tmp/jieba.cache
Loading model cost 0.624 seconds.
Prefix dict has been built successfully.
Some weights of the model checkpoint at bert-base-multilingual-uncased were not used when initializing BertForMaskedLM: ['cls.seq_relationship.weight', 'cls.seq_relationship.bias']
- This IS expected if you are initializing BertForMaskedLM from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).
- This IS NOT expected if you are initializing BertForMaskedLM from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).
100%|██████████| 1/1 [00:06<00:00, 6.32s/it]
100%|██████████| 1/1 [00:06<00:00, 6.32s/it]