default95
typenumeric
value typeinteger
{
"freq_penalty": 5,
"ref_audio_file": "https://replicate.delivery/pbxt/L9a6SelzU0B2DIWeNpkNR0CKForWSbkswoUP69L0NLjLswVV/voice_sample.wav",
"ref_audio_transcript": "Hi there. I'm your new voice clone. Try your best to upload quality audio.",
"rep_penalty_window": 150,
"temperature": 1.1,
"text": "Introducing Mars5, a revolutionary open-source text-to-speech model.",
"top_k": 100
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_1UQ**********************************
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 platform-kit/mars5-tts using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"platform-kit/mars5-tts:6aed0f11f3ba7b13d59ab3228355e7b1ea943479673cc57e10e99ba766536811",
{
input: {
freq_penalty: 5,
ref_audio_file: "https://replicate.delivery/pbxt/L9a6SelzU0B2DIWeNpkNR0CKForWSbkswoUP69L0NLjLswVV/voice_sample.wav",
ref_audio_transcript: "Hi there. I'm your new voice clone. Try your best to upload quality audio.",
rep_penalty_window: 150,
temperature: 1.1,
text: "Introducing Mars5, a revolutionary open-source text-to-speech model.",
top_k: 100
}
}
);
// 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_1UQ**********************************
This is your API token. Keep it to yourself.
import replicate
Run platform-kit/mars5-tts using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"platform-kit/mars5-tts:6aed0f11f3ba7b13d59ab3228355e7b1ea943479673cc57e10e99ba766536811",
input={
"freq_penalty": 5,
"ref_audio_file": "https://replicate.delivery/pbxt/L9a6SelzU0B2DIWeNpkNR0CKForWSbkswoUP69L0NLjLswVV/voice_sample.wav",
"ref_audio_transcript": "Hi there. I'm your new voice clone. Try your best to upload quality audio.",
"rep_penalty_window": 150,
"temperature": 1.1,
"text": "Introducing Mars5, a revolutionary open-source text-to-speech model.",
"top_k": 100
}
)
# 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_1UQ**********************************
This is your API token. Keep it to yourself.
Run platform-kit/mars5-tts 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": "platform-kit/mars5-tts:6aed0f11f3ba7b13d59ab3228355e7b1ea943479673cc57e10e99ba766536811",
"input": {
"freq_penalty": 5,
"ref_audio_file": "https://replicate.delivery/pbxt/L9a6SelzU0B2DIWeNpkNR0CKForWSbkswoUP69L0NLjLswVV/voice_sample.wav",
"ref_audio_transcript": "Hi there. I\'m your new voice clone. Try your best to upload quality audio.",
"rep_penalty_window": 150,
"temperature": 1.1,
"text": "Introducing Mars5, a revolutionary open-source text-to-speech model.",
"top_k": 100
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "z2gfevta3nrgj0cg9s1b35tqtc",
"model": "platform-kit/mars5-tts",
"version": "6aed0f11f3ba7b13d59ab3228355e7b1ea943479673cc57e10e99ba766536811",
"input": {
"freq_penalty": 5,
"ref_audio_file": "https://replicate.delivery/pbxt/L9a6SelzU0B2DIWeNpkNR0CKForWSbkswoUP69L0NLjLswVV/voice_sample.wav",
"ref_audio_transcript": "Hi there. I'm your new voice clone. Try your best to upload quality audio.",
"rep_penalty_window": 150,
"temperature": 1.1,
"text": "Introducing Mars5, a revolutionary open-source text-to-speech model.",
"top_k": 100
},
"logs": ">>> Running inference\nNote: using deep clone. Assuming input `c_phones` is concatenated prompt and output phones. Also assuming no padded indices in `c_codes`.\nNew x: torch.Size([1, 1221, 8]) | new x_known: torch.Size([1, 1221, 8]) . Base prompt: torch.Size([1, 428, 8]). New padding mask: torch.Size([1, 1221]) | m shape: torch.Size([1, 1221, 8])\n>>>>> Done with inference",
"output": "https://replicate.delivery/pbxt/SNQoUjOGgIquMBQeFVpDuMovF0KBnL8lRBbPBlD3Fi8pCBhJA/output.mp3",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-06-25T07:18:05.597Z",
"started_at": "2024-06-25T07:18:05.623256Z",
"completed_at": "2024-06-25T07:18:43.910284Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/z2gfevta3nrgj0cg9s1b35tqtc/cancel",
"get": "https://api.replicate.com/v1/predictions/z2gfevta3nrgj0cg9s1b35tqtc",
"web": "https://replicate.com/p/z2gfevta3nrgj0cg9s1b35tqtc"
},
"metrics": {
"predict_time": 38.287027714,
"total_time": 38.313284
}
}