defaultHi there, I'm your new voice clone. Try your best to upload quality audio
typetext
{
"cleanup_voice": false,
"language": "en",
"speaker": "https://replicate.delivery/pbxt/JuUpjfrVonmSBwOFzMsLR6uKiSLXN4zI12HfAhlAvdj7oc7g/male_audio.mp3",
"text": "Hi there, this is a test with an mp3 file"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_0qw**********************************
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 lucataco/xtts-v2 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"lucataco/xtts-v2:49ff6cfa14bd4e7f80f62e2279f82f23dfc2e7970f825f8db5599f8a6213c009",
{
input: {
cleanup_voice: false,
language: "en",
speaker: "https://replicate.delivery/pbxt/JuUpjfrVonmSBwOFzMsLR6uKiSLXN4zI12HfAhlAvdj7oc7g/male_audio.mp3",
text: "Hi there, this is a test with an mp3 file"
}
}
);
// 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_0qw**********************************
This is your API token. Keep it to yourself.
import replicate
Run lucataco/xtts-v2 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"lucataco/xtts-v2:49ff6cfa14bd4e7f80f62e2279f82f23dfc2e7970f825f8db5599f8a6213c009",
input={
"cleanup_voice": False,
"language": "en",
"speaker": "https://replicate.delivery/pbxt/JuUpjfrVonmSBwOFzMsLR6uKiSLXN4zI12HfAhlAvdj7oc7g/male_audio.mp3",
"text": "Hi there, this is a test with an mp3 file"
}
)
# 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_0qw**********************************
This is your API token. Keep it to yourself.
Run lucataco/xtts-v2 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": "lucataco/xtts-v2:49ff6cfa14bd4e7f80f62e2279f82f23dfc2e7970f825f8db5599f8a6213c009",
"input": {
"cleanup_voice": false,
"language": "en",
"speaker": "https://replicate.delivery/pbxt/JuUpjfrVonmSBwOFzMsLR6uKiSLXN4zI12HfAhlAvdj7oc7g/male_audio.mp3",
"text": "Hi there, this is a test with an mp3 file"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "gnlu2zbbq4hgdubx5kkzn6lbzy",
"model": "lucataco/xtts-v2",
"version": "49ff6cfa14bd4e7f80f62e2279f82f23dfc2e7970f825f8db5599f8a6213c009",
"input": {
"cleanup_voice": false,
"language": "en",
"speaker": "https://replicate.delivery/pbxt/JuUpjfrVonmSBwOFzMsLR6uKiSLXN4zI12HfAhlAvdj7oc7g/male_audio.mp3",
"text": "Hi there, this is a test with an mp3 file"
},
"logs": "ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers\nbuilt with gcc 11 (Ubuntu 11.2.0-19ubuntu1)\nconfiguration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared\nlibavutil 56. 70.100 / 56. 70.100\nlibavcodec 58.134.100 / 58.134.100\nlibavformat 58. 76.100 / 58. 76.100\nlibavdevice 58. 13.100 / 58. 13.100\nlibavfilter 7.110.100 / 7.110.100\nlibswscale 5. 9.100 / 5. 9.100\nlibswresample 3. 9.100 / 3. 9.100\nlibpostproc 55. 9.100 / 55. 9.100\nInput #0, mp3, from '/tmp/tmpo6tiloubmale_audio.mp3':\nMetadata:\ntitle : EVCapture4.2.2软件录制\ncomment : audio-extractor.net\nDuration: 00:00:06.14, start: 0.025057, bitrate: 133 kb/s\nStream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 128 kb/s\nMetadata:\nencoder : Lavc59.37\nStream mapping:\nStream #0:0 -> #0:0 (mp3 (mp3float) -> pcm_s16le (native))\nPress [q] to stop, [?] for help\nOutput #0, wav, to '/tmp/speaker.wav':\nMetadata:\nINAM : EVCapture4.2.2软件录制\nICMT : audio-extractor.net\nISFT : Lavf58.76.100\nStream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s\nMetadata:\nencoder : Lavc58.134.100 pcm_s16le\nsize= 0kB time=00:00:00.00 bitrate=N/A speed= 0x\nsize= 1052kB time=00:00:06.08 bitrate=1415.8kbits/s speed= 520x\nvideo:0kB audio:1052kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.013182%\n> Text splitted to sentences.\n['Hi there, this is a test with an mp3 file']\n> Processing time: 2.1343066692352295\n> Real-time factor: 0.5281632929681812",
"output": "https://replicate.delivery/pbxt/RdFEQCNX6EbTL9Z6fPm4VK4qIQjX4RrTxhsfwfmnzsPESj0jA/output.wav",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-11-20T14:07:59.703056Z",
"started_at": "2023-11-20T14:07:59.718508Z",
"completed_at": "2023-11-20T14:08:02.397201Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/gnlu2zbbq4hgdubx5kkzn6lbzy/cancel",
"get": "https://api.replicate.com/v1/predictions/gnlu2zbbq4hgdubx5kkzn6lbzy"
},
"metrics": {
"predict_time": 2.678693,
"total_time": 2.694145
}
}