No description
| src | ||
| systemd | ||
| .gitignore | ||
| AGENTS.md | ||
| lel.sh | ||
| Makefile | ||
| README.md | ||
| requirements.txt | ||
lel
Python X11 transcription daemon that records audio, runs Whisper, logs the transcript, and can optionally run AI post-processing before injecting text.
Requirements
- X11 (not Wayland)
ffmpegfaster-whisperxclipxdotool- Tray icon deps:
libappindicator3andgtk3(required bysystray) - Python deps:
pystray,pillow,python-xlib,faster-whisper
Python Daemon
Install Python deps:
pip install -r requirements.txt
Run:
python3 src/leld.py --config ~/.config/lel/config.json
Config
Create ~/.config/lel/config.json:
{
"hotkey": "Cmd+m",
"ffmpeg_input": "pulse:default",
"ffmpeg_path": "",
"whisper_model": "base",
"whisper_lang": "en",
"whisper_device": "cpu",
"record_timeout_sec": 120,
"injection_backend": "clipboard",
"ai_enabled": true,
"ai_model": "llama3.2:3b",
"ai_temperature": 0.0,
"ai_system_prompt_file": "",
"ai_base_url": "http://localhost:11434/v1/chat/completions",
"ai_api_key": "",
"ai_timeout_sec": 20
}
Env overrides:
WHISPER_MODEL,WHISPER_LANG,WHISPER_DEVICEWHISPER_FFMPEG_INLEL_RECORD_TIMEOUT_SEC,LEL_HOTKEY,LEL_INJECTION_BACKENDLEL_FFMPEG_PATHLEL_AI_ENABLED,LEL_AI_MODEL,LEL_AI_TEMPERATURE,LEL_AI_SYSTEM_PROMPT_FILELEL_AI_BASE_URL,LEL_AI_API_KEY,LEL_AI_TIMEOUT_SEC
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 transcribe.
- The transcript is logged to stderr.
Injection backends:
clipboard: copy to clipboard and inject via Ctrl+V (requiresxclip+xdotool)injection: type the text with simulated keypresses (requiresxdotool)
AI provider:
- Generic OpenAI-compatible chat API at
ai_base_url
Control:
make run