typetext
{
"speed": 1.05,
"text": "Let me whisper to you about something extraordinary... a text-to-speech model named Kokoro... with just 82 million parameters... so elegant... so efficient. Released on Christmas Day 2024... under the gentle embrace of the Apache 2.0 license... such generosity.\nPicture this... ten beautiful voicepacks... each one crafted with such care... American voices... British voices... all flowing like silk through digital space. And in the TTS Spaces Arena... Kokoro rose to number one... surpassing giants with billions of parameters... proving that sometimes... the most delicate touch... creates the most beautiful results.\nJust imagine... less than 100 hours of training audio... compared to others using thousands... millions of hours... yet Kokoro... so graceful... so precise... topped them all. Its architecture... inspired by StyleTTS 2 and ISTFTNet... works without diffusion... without encoder release... just pure... elegant... efficiency.\nAnd using it... so simple... so smooth. A few lines of code... and suddenly... your words become gentle waves of sound... at 24 kilohertz... like honey flowing through your ears. The phonemizer... carefully crafting each sound... the model... tenderly shaping each syllable... until your message emerges... like a whispered secret... in the voice of your choosing.\nIsn't it fascinating... how something so small... can create something so beautiful? The possibilities... are simply... endless...",
"voice": "af_nicole"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_Loo**********************************
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 jaaari/kokoro-82m using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"jaaari/kokoro-82m:dfdf537ba482b029e0a761699e6f55e9162cfd159270bfe0e44857caa5f275a6",
{
input: {
speed: 1.05,
text: "Let me whisper to you about something extraordinary... a text-to-speech model named Kokoro... with just 82 million parameters... so elegant... so efficient. Released on Christmas Day 2024... under the gentle embrace of the Apache 2.0 license... such generosity.\nPicture this... ten beautiful voicepacks... each one crafted with such care... American voices... British voices... all flowing like silk through digital space. And in the TTS Spaces Arena... Kokoro rose to number one... surpassing giants with billions of parameters... proving that sometimes... the most delicate touch... creates the most beautiful results.\nJust imagine... less than 100 hours of training audio... compared to others using thousands... millions of hours... yet Kokoro... so graceful... so precise... topped them all. Its architecture... inspired by StyleTTS 2 and ISTFTNet... works without diffusion... without encoder release... just pure... elegant... efficiency.\nAnd using it... so simple... so smooth. A few lines of code... and suddenly... your words become gentle waves of sound... at 24 kilohertz... like honey flowing through your ears. The phonemizer... carefully crafting each sound... the model... tenderly shaping each syllable... until your message emerges... like a whispered secret... in the voice of your choosing.\nIsn't it fascinating... how something so small... can create something so beautiful? The possibilities... are simply... endless...",
voice: "af_nicole"
}
}
);
// 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_Loo**********************************
This is your API token. Keep it to yourself.
import replicate
Run jaaari/kokoro-82m using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"jaaari/kokoro-82m:dfdf537ba482b029e0a761699e6f55e9162cfd159270bfe0e44857caa5f275a6",
input={
"speed": 1.05,
"text": "Let me whisper to you about something extraordinary... a text-to-speech model named Kokoro... with just 82 million parameters... so elegant... so efficient. Released on Christmas Day 2024... under the gentle embrace of the Apache 2.0 license... such generosity.\nPicture this... ten beautiful voicepacks... each one crafted with such care... American voices... British voices... all flowing like silk through digital space. And in the TTS Spaces Arena... Kokoro rose to number one... surpassing giants with billions of parameters... proving that sometimes... the most delicate touch... creates the most beautiful results.\nJust imagine... less than 100 hours of training audio... compared to others using thousands... millions of hours... yet Kokoro... so graceful... so precise... topped them all. Its architecture... inspired by StyleTTS 2 and ISTFTNet... works without diffusion... without encoder release... just pure... elegant... efficiency.\nAnd using it... so simple... so smooth. A few lines of code... and suddenly... your words become gentle waves of sound... at 24 kilohertz... like honey flowing through your ears. The phonemizer... carefully crafting each sound... the model... tenderly shaping each syllable... until your message emerges... like a whispered secret... in the voice of your choosing.\nIsn't it fascinating... how something so small... can create something so beautiful? The possibilities... are simply... endless...",
"voice": "af_nicole"
}
)
# 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_Loo**********************************
This is your API token. Keep it to yourself.
Run jaaari/kokoro-82m 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": "jaaari/kokoro-82m:dfdf537ba482b029e0a761699e6f55e9162cfd159270bfe0e44857caa5f275a6",
"input": {
"speed": 1.05,
"text": "Let me whisper to you about something extraordinary... a text-to-speech model named Kokoro... with just 82 million parameters... so elegant... so efficient. Released on Christmas Day 2024... under the gentle embrace of the Apache 2.0 license... such generosity.\\nPicture this... ten beautiful voicepacks... each one crafted with such care... American voices... British voices... all flowing like silk through digital space. And in the TTS Spaces Arena... Kokoro rose to number one... surpassing giants with billions of parameters... proving that sometimes... the most delicate touch... creates the most beautiful results.\\nJust imagine... less than 100 hours of training audio... compared to others using thousands... millions of hours... yet Kokoro... so graceful... so precise... topped them all. Its architecture... inspired by StyleTTS 2 and ISTFTNet... works without diffusion... without encoder release... just pure... elegant... efficiency.\\nAnd using it... so simple... so smooth. A few lines of code... and suddenly... your words become gentle waves of sound... at 24 kilohertz... like honey flowing through your ears. The phonemizer... carefully crafting each sound... the model... tenderly shaping each syllable... until your message emerges... like a whispered secret... in the voice of your choosing.\\nIsn\'t it fascinating... how something so small... can create something so beautiful? The possibilities... are simply... endless...",
"voice": "af_nicole"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "k3cg51x8vdrga0cmbzj9ttswzg",
"model": "jaaari/kokoro-82m",
"version": "dfdf537ba482b029e0a761699e6f55e9162cfd159270bfe0e44857caa5f275a6",
"input": {
"speed": 1.05,
"text": "Let me whisper to you about something extraordinary... a text-to-speech model named Kokoro... with just 82 million parameters... so elegant... so efficient. Released on Christmas Day 2024... under the gentle embrace of the Apache 2.0 license... such generosity.\nPicture this... ten beautiful voicepacks... each one crafted with such care... American voices... British voices... all flowing like silk through digital space. And in the TTS Spaces Arena... Kokoro rose to number one... surpassing giants with billions of parameters... proving that sometimes... the most delicate touch... creates the most beautiful results.\nJust imagine... less than 100 hours of training audio... compared to others using thousands... millions of hours... yet Kokoro... so graceful... so precise... topped them all. Its architecture... inspired by StyleTTS 2 and ISTFTNet... works without diffusion... without encoder release... just pure... elegant... efficiency.\nAnd using it... so simple... so smooth. A few lines of code... and suddenly... your words become gentle waves of sound... at 24 kilohertz... like honey flowing through your ears. The phonemizer... carefully crafting each sound... the model... tenderly shaping each syllable... until your message emerges... like a whispered secret... in the voice of your choosing.\nIsn't it fascinating... how something so small... can create something so beautiful? The possibilities... are simply... endless...",
"voice": "af_nicole"
},
"logs": "Text has 1441 characters. Using voice af_nicole and speed 1.05.\nText is longer than 400 characters, splitting into sentences.\nProcessing 11 chunks. Starting generation...",
"output": "https://replicate.delivery/czjl/u53cMhblG9K8G1ELfqoVbm25DeucsAMBKEJDyXdNfeFwbySQB/output.wav",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-01-13T13:40:08.539Z",
"started_at": "2025-01-13T13:40:08.554065Z",
"completed_at": "2025-01-13T13:40:13.001805Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/k3cg51x8vdrga0cmbzj9ttswzg/cancel",
"get": "https://api.replicate.com/v1/predictions/k3cg51x8vdrga0cmbzj9ttswzg",
"stream": "https://stream.replicate.com/v1/files/fddq-rb6odminhmoa4evgp2j3afy4pdz2psbifrtndmsg4wr573hjqttq",
"web": "https://replicate.com/p/k3cg51x8vdrga0cmbzj9ttswzg"
},
"metrics": {
"predict_time": 4.447739352,
"total_time": 4.462805
}
}