CLI · open sourcelive

local-tts

Make your coding agent talk to you with simple, offline and optional online text-to-speech.

  • 7stars
  • 2forks
  • v2.0.1latest release
  • MITlicense
  • Python 3.9+requires
  • 2026-09-21last push
  • v2.0.1
  • Linux
  • macOS
  • Windows

A tiny command-line text-to-speech tool that makes your coding agent talk to you. It shells out to Kokoro-82M by default—eight languages from one small model—so speech is generated locally and offline.

It supports optional online speech and keeps language preferences in one config file rather than one chat, so every agent on the machine speaks the same way.

Highlights

  • Offline by defaultKokoro-82M speaks eight languages from one small model. No API key, nothing leaves the machine.
  • Zero runtime dependenciesThe package installs only itself. Standard library plus binaries you already have.
  • Tone tagsInline <calm>, <urgent>, <whisper> and more change the delivery per sentence.
  • Starts in a secondFragments play as soon as the first is synthesised instead of after the whole passage.
  • Any voice via RVCBring a trained .pth and every agent on the machine speaks in that voice, per language.
  • Six backendskokoro, piper, llamacpp, any OpenAI-compatible endpoint, RVC, or any command that writes a WAV.
  • Built for coding agentsShips skills and hooks for Claude Code and friends, so the agent installs and drives it.
  • Language memoryRemembers which backend and voice to use for each language.

Usage

  • Markdown is handled for you: headings, emphasis, link URLs, bullet markers, tables and fenced code blocks are stripped before synthesis.

  • Backends that need short prompts get the text split at sentence boundaries, synthesized piece by piece, and joined into one file with a pause between pieces.

  • The pause is padded onto the fragment itself rather than inserted while joining, so streamed playback and the saved file are the same sound.

Providers

  • Each one wins at something the default does not do: a voice you trained yourself, a hosted endpoint, or a binary you already have.

  • Piper runs neural ONNX voices on the CPU, with good models for many languages.

  • The openai provider speaks HTTP using urllib—no SDK involved—and works with OpenAI itself and local servers.

  • Tone tags change the delivery per sentence; a borrowed word is handled by the pronunciation dictionary's IPA entries, inside the same utterance.

Using your own models

  • Bring your own voice model: local-tts wires up a voice model you already have or trained; it does not distribute voices.

  • The rvc provider is never installed automatically—it pulls in torch and is sizable; set it up deliberately.

  • rvc-python does audio-to-audio voice conversion only—it has no text input.

  • Cloning a real person's voice without their consent is not what this is for.

Install

pipx install agents-local-tts
tts "Hello from my terminal."