{
 "schema_version": 1,
 "generated": "2026-10-31",
 "id": "hexgrad-kokoro--turn-text-into-speech-with-kokoro",
 "repo": "hexgrad/kokoro",
 "repo_url": "https://github.com/hexgrad/kokoro",
 "repo_slug": "hexgrad-kokoro",
 "title": "Turn a script into WAV files in a few lines",
 "page_title": "How to turn a script into WAV files in a few lines with Kokoro",
 "summary": "Run a KPipeline with the af_heart voice and save each generated chunk as audio.",
 "who": "A creator who needs voiceovers without a paid TTS service.",
 "problem": "Cloud TTS costs add up and needs an account.",
 "outcome": "Numbered WAV files at 24000 Hz for your text.",
 "steps": [
  "Install with `!pip install -q kokoro>=0.9.4 soundfile` in Colab, or the same pip install locally",
  "Install espeak-ng with `!apt-get -qq -y install espeak-ng > /dev/null 2>&1` on Colab or Debian",
  "Create KPipeline(lang_code='a') and call it with your text and voice='af_heart'",
  "Write each audio chunk with sf.write at 24000"
 ],
 "agent_prompt": "Using hexgrad/kokoro, install it with pip and espeak-ng, then write a script that reads <my text file> with KPipeline(lang_code='a') and voice af_heart and saves numbered WAV files.",
 "agents": [
  "claude-code",
  "codex",
  "cursor",
  "gemini-cli"
 ],
 "difficulty": "Beginner",
 "time": "15 minutes",
 "basis": "readme",
 "caveat": "This card is written from the hexgrad/kokoro README, not from a test run by Deduped. Before you start, make sure you have Python with pip. Check the repo for newer instructions before you rely on these steps.",
 "category": "Content",
 "tags": [
  "Content"
 ],
 "lang": "javascript",
 "requirements": [
  "Python with pip (the README conda file uses Python 3.9)",
  "espeak-ng installed for fallback and some languages",
  "Optional: an Apple Silicon Mac for MPS acceleration"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/hexgrad-kokoro/turn-text-into-speech-with-kokoro/",
 "md": "https://dedupedai.com/use-cases/hexgrad-kokoro/turn-text-into-speech-with-kokoro/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/hexgrad-kokoro--turn-text-into-speech-with-kokoro.json",
 "api_version": "v1"
}
