Read text aloud with high-quality neural TTS — from clipboard, stdin, or argument.
Warning
Lector is in early development. Expect rough edges, breaking changes, and missing features.
Lector wraps kokoro-onnx in a simple CLI with an interactive player. Audio is streamed chunk-by-chunk so reading starts immediately, even for long texts.
You need uv, a Python package manager. It handles everything else (including Python itself) automatically.
Linux
Install PortAudio (required by sounddevice for playback):
sudo apt install libportaudio2 portaudio19-dev # Debian / UbuntuFor lector read --clipboard, install a clipboard provider:
sudo apt install xclip # X11
sudo apt install xsel # X11 (alternative)
sudo apt install wl-clipboard # WaylandThen install uv:
curl -LsSf https://astral.sh/uv/install.sh | shWindows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"Restart your shell after installing so that the uv command is available.
uv tool install git+https://github.com/clstaudt/lectorOr from a local checkout:
uv tool install /path/to/lectorThe first run downloads model files (~300 MB) to ~/.lector/models/.
# Read text directly
lector read "The quick brown fox jumps over the lazy dog."
# Read from the clipboard
lector read --clipboard
# Pipe text in
cat article.txt | lector readLector detects the language automatically and picks a matching voice.
| Key | Action |
|---|---|
Space |
Pause / resume |
q |
Quit |
r |
Restart |
← h |
Previous chunk |
→ l |
Next chunk |
+ |
Speed up |
- |
Slow down |
Language is detected automatically by default (--lang auto).
Set it explicitly with --lang:
--lang |
Language | Default voice |
|---|---|---|
auto |
Auto-detect (default) | — |
en-us |
English (US) | af_sky |
en-gb |
English (GB) | bf_emma |
es |
Spanish | ef_dora |
fr-fr |
French | ff_siwis |
hi |
Hindi | hf_alpha |
it |
Italian | if_sara |
ja |
Japanese | jf_alpha |
pt-br |
Portuguese (BR) | pf_dora |
zh |
Chinese (Mandarin) | zf_xiaobei |
de |
German | martin |
lector read "Bonjour, comment allez-vous ?" # auto-detected
lector read --lang de "Guten Morgen, wie geht es Ihnen?" # explicitIf a detected language is not supported, Lector falls back to English.
German uses a separate community model
(Kokoro-82M-ONNX-German-Martin),
fetched automatically on first use (or in advance with
lector download --german).
lector voices # all voices, grouped by language
lector voices --lang fr-fr # only French voicesPick a specific voice with --voice (this also implies the language):
lector read --voice af_nicole --speed 0.9 "Hello!"See the full list at Kokoro-82M/VOICES.md.
Add a Quick Action so Read with Lector appears in the right-click Services menu:
lector install-serviceSelect text in any app → right-click → Services → Read with Lector. You may need to enable it in System Settings → Keyboard → Keyboard Shortcuts → Services.
| Command | Description |
|---|---|
lector read |
Read text aloud (arg / clipboard / stdin) |
lector voices |
List available voices by language |
lector download |
Pre-download model files (~300 MB) |
lector download --german |
Pre-download the German model |
lector install-service |
Install macOS Quick Action |
Key lector read options: --lang, --voice, --speed.
uv tool upgrade lectoruv tool uninstall lector
rm -rf ~/.lector # remove downloaded modelsgit clone <repo-url> && cd lector
uv sync
uv run lector read "Hello!"
uv run pytestGPL-3.0-or-later