DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to generate speech in Spanish, French, Hindi or Japanese with Kokoro

Switch the pipeline's lang_code to voice text in other supported languages.

Short answer: Install Kokoro and espeak-ng as in the README; then pick a lang_code: e for Spanish, f for French, h for Hindi, j for Japanese, z for Mandarin; For Japanese or Mandarin install pip install misaki[ja] or pip install misaki[zh]. All steps.

  • Content
  • Beginner
  • 20 minutes
  • From the README
  • Claude Code
  • Codex
  • Cursor
  • Gemini CLI

Who it is forA teacher or creator making audio in several languages.

The problemMany open TTS models only speak English well.

The outcomeAudio in the language you pick.

What you need first

  • 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

Steps

  1. Install Kokoro and espeak-ng as in the README
  2. Pick a lang_code: e for Spanish, f for French, h for Hindi, j for Japanese, z for Mandarin
  3. For Japanese or Mandarin install pip install misaki[ja] or pip install misaki[zh]
  4. Create the KPipeline with that code and generate as usual

Prompt for your agent

With hexgrad/kokoro, generate <my paragraph> in Spanish and French using KPipeline with lang_code e and f, and save each language to its own WAV.

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.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for hexgrad/kokoro and "Generate speech in Spanish, French, Hindi or Japanese"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer