nazdridoy/kokoro-tts

A CLI text-to-speech tool using the Kokoro model, supporting multiple languages, voices (with blending), and various input formats including EPUB books and PDF documents.

What it solves

Kokoro TTS provides a command-line interface (CLI) for converting text into high-quality, natural-sounding speech. It simplifies the process of turning long-form content—such as EPUB books, PDF documents, and text files—into audio files or streaming audio, removing the need for complex setups to use the Kokoro model.

How it works

The tool uses the Kokoro model (via ONNX) to synthesize speech. It can process various input formats, including standard input (stdin) for piping text from other programs, and automatically handles the chunking of long texts into manageable segments. It supports multiple languages and allows users to blend different voices by assigning customizable weights to create a hybrid voice.

Who it’s for

This tool is designed for users who prefer terminal-based workflows and want to convert documents or books into audiobooks or speech streams without needing a graphical user interface.

Highlights

  • Document Support: Directly processes .epub, .pdf, and .txt files, with the ability to split output into chapters.
  • Voice Customization: Supports multiple languages and voice blending with adjustable weights.
  • Flexible Output: Offers streaming audio playback, WAV and MP3 formats, and the ability to merge audio chunks.
  • Hardware Acceleration: Includes GPU support for faster synthesis.
  • CLI Integration: Supports piping from other programs via stdin.

Related

  • Project
  • Project
  • Project
  • Dispatch
  • Project