Skip to main content

ltts

PyPI Version Python Versions License UV Friendly CI Publish

Quick CLI for local text-to-speech with two backends: Qwen3-TTS (default) and Kokoro TTS.

Install

Recommended (fast, reproducible):

uv tool install ltts

Run without installing:

uvx ltts "hello world" --say

With pip:

pip install ltts

NVIDIA GPU (Optional)

For faster inference on NVIDIA GPUs:

pip install 'ltts[cuda]'

Usage

# Generate speech (saves to output.mp3 by default)
ltts "Hello, world!"

# Play through speakers
ltts "Hello, world!" --say

# Save to specific file
ltts "Hello, world!" -o speech.wav

# Read from stdin
echo "Hello from pipe" | ltts --say
cat article.txt | ltts -o article.mp3

Backends

Qwen3-TTS (default)

Higher quality with voice cloning and emotional control. Supports 10 languages.

# Preset voices
ltts "Hello, world!" -v Ryan --say       # English male (default)
ltts "Hello, world!" -v Aiden --say      # English male
ltts "你好世界" -v Vivian --say           # Chinese female
ltts "こんにちは" -v Ono_Anna --say       # Japanese female
ltts "안녕하세요" -v Sohee --say           # Korean female

# Voice cloning (3+ seconds of reference audio)
ltts "Hello in your voice" --ref-audio voice.wav --say
ltts "Hello" --ref-audio voice.wav --ref-text "transcript" --say

# Emotional control
ltts "I can't believe we won!" --instruct "speak with excitement" --say

# Smaller model for faster inference
ltts "Hello world" --model-size 0.6B --say

Preset voices: Ryan, Aiden (English), Vivian, Serena, Dylan, Eric, Uncle_Fu (Chinese), Ono_Anna (Japanese), Sohee (Korean)

Languages: en, zh, ja, ko, de, fr, es, pt, it, ru

Kokoro TTS

Lightweight with 50+ voices. Supports streaming for faster time-to-first-audio.

# Use Kokoro backend
ltts "Hello world" -b kokoro -v af_heart --say
ltts "こんにちは" -b kokoro -v jf_alpha --say

# Stream chunks as generated (lower latency)
ltts "Hello world" -b kokoro --say --chunk

Voices: af_heart, af_alloy, af_bella, am_adam, am_michael (American), bf_alice, bf_emma, bm_daniel (British), jf_alpha, jm_kumo (Japanese), zf_xiaobei, zm_yunxi (Chinese), ef_dora, em_alex (Spanish), ff_siwis (French), and more.

Full voice list: https://huggingface.co/hexgrad/Kokoro-82M/blob/main/VOICES.md

Options

# Device selection
ltts "Hello" -d cpu --say    # CPU (default)
ltts "Hello" -d cuda --say   # NVIDIA GPU
ltts "Hello" -d mps --say    # Apple Silicon

# Output formats
ltts "test" -o out.mp3       # MP3 (default)
ltts "test" -o out.wav       # WAV
ltts "test" -o out.ogg       # OGG
ltts "test" -o out.flac      # FLAC

# Language override
ltts "Bonjour" -l fr --say

Notes

  • First run downloads models to ~/.cache/huggingface/ (~3GB for Qwen 1.7B, ~330MB for Kokoro)
  • Audio playback (--say) runs at 24 kHz
  • On Linux, ensure PulseAudio/PipeWire is running for audio playback

Development

uv sync
uv run ltts "hello world" --say
uv run ltts "hello world" -b kokoro -v af_heart --say
./scripts/release.sh

Metadata

Release files for ltts 0.4.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ltts 0.4.2
File Size Uploaded Provenance Actions
ltts-0.4.2.tar.gz 12.0 kB Without provenance Details for ltts-0.4.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ltts 0.4.2
File Interpreter ABI Platform Actions
ltts-0.4.2-py3-none-any.whl Python 3 none any Details for ltts-0.4.2-py3-none-any.whl

Total release size: 24.6 kB

Release files / ltts-0.4.2.tar.gz

Download URL ltts-0.4.2.tar.gz
Size 12.0 kB
Tags Source
SHA-256 checksum
How to use checksums
afc257525b511d00da72cb4e0a4fedffbb9a28ac2b1f260c71d9ffb26d7ccd47
BLAKE2b-256 checksum
How to use checksums
87872625e4118ca69aefd0cefd7ee6a3590b9b1458e5904991b0cd8f574c5910
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / ltts-0.4.2-py3-none-any.whl

Download URL ltts-0.4.2-py3-none-any.whl
Size 12.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6a14c29792042f614b8c0867a970a3dd78ac19e782ebed499b8e58a43d97eccf
BLAKE2b-256 checksum
How to use checksums
72b410212c7482cefad2ff2c4661f0c9c6e7b20a9c2de3980b89053d8b1b8468
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for ltts 0.4.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page