No description
Find a file
2026-02-24 11:38:05 -03:00
src Update STT tray icon 2026-02-24 11:38:05 -03:00
systemd Clean up config and STT naming 2026-02-24 11:15:48 -03:00
.gitignore Update project files 2026-02-10 11:01:36 -03:00
AGENTS.md Inline STT and tray 2026-02-24 11:27:22 -03:00
Makefile Update project files 2026-02-10 11:01:36 -03:00
pyproject.toml Clean up config and STT naming 2026-02-24 11:15:48 -03:00
README.md Inline STT and tray 2026-02-24 11:27:22 -03:00
uv.lock Remove context capture 2026-02-24 11:01:18 -03:00

lel

Python X11 STT daemon that records audio, runs Whisper, logs the transcript, and can optionally run AI post-processing before injecting text.

Requirements

  • X11 (not Wayland)
  • sounddevice (PortAudio)
  • soundfile (libsndfile)
  • faster-whisper
  • Tray icon deps: gtk3
  • Python deps: pillow, python-xlib, faster-whisper, PyGObject, sounddevice, soundfile

System packages (example names): portaudio/libportaudio2 and libsndfile.

Python Daemon

Install Python deps:

uv sync

Run:

uv run python3 src/leld.py --config ~/.config/lel/config.json

Config

Create ~/.config/lel/config.json:

{
  "daemon": { "hotkey": "Cmd+m" },
  "recording": { "input": "0" },
  "stt": { "model": "base", "device": "cpu" },
  "injection": { "backend": "clipboard" },

  "ai_cleanup": {
    "model": "llama3.2:3b",
    "base_url": "http://localhost:11434",
    "api_key": ""
  }
}

Recording input can be a device index (preferred) or a substring of the device name.

systemd user service

mkdir -p ~/.local/bin
cp src/leld.py ~/.local/bin/leld.py
cp systemd/lel.service ~/.config/systemd/user/lel.service
systemctl --user daemon-reload
systemctl --user enable --now lel

Usage

  • Press the hotkey once to start recording.
  • Press it again to stop and run STT.
  • The transcript is logged to stderr.

Injection backends:

  • clipboard: copy to clipboard and inject via Ctrl+Shift+V (GTK clipboard + XTest)
  • injection: type the text with simulated keypresses (XTest)

AI provider:

  • Generic OpenAI-compatible chat API at ai_base_url (base URL only; the app uses /v1/chat/completions)

Control:

make run