38 lines
1.6 KiB
Markdown
38 lines
1.6 KiB
Markdown
# Repository Guidelines
|
|
|
|
## Project Structure & Module Organization
|
|
|
|
- `src/leld.py` is the primary entrypoint (X11 STT daemon).
|
|
- `src/recorder.py` handles audio capture using PortAudio via `sounddevice`.
|
|
- `src/leld.py` owns Whisper setup and transcription.
|
|
- `src/aiprocess.py` runs the in-process Llama-3.2-3B cleanup.
|
|
|
|
## Build, Test, and Development Commands
|
|
|
|
- Install deps: `uv sync`.
|
|
- Run daemon: `uv run python3 src/leld.py --config ~/.config/lel/config.json`.
|
|
|
|
System packages (example names): `portaudio`/`libportaudio2`, `libayatana-appindicator3`.
|
|
|
|
## Coding Style & Naming Conventions
|
|
|
|
- Shell scripts use Bash with `set -euo pipefail`.
|
|
- Indentation is two spaces; prefer lowercase variable names for locals and uppercase for environment-configured values.
|
|
- Keep functions small and focused; add comments only where the intent is not obvious.
|
|
|
|
## Testing Guidelines
|
|
|
|
- No automated tests are present.
|
|
- If you add tests, include a brief note in `AGENTS.md` with the runner command and test location.
|
|
|
|
## Commit & Pull Request Guidelines
|
|
|
|
- Commit history is minimal and does not establish a convention; use short, imperative messages (e.g., "Add device override").
|
|
- PRs should include a concise description, repro steps, and any environment variables or dependencies added.
|
|
|
|
## Configuration Tips
|
|
|
|
- Audio input is configured via the `recording.input` field in `config.json`.
|
|
- STT model and device are configured via the `stt` section in `config.json`.
|
|
- LLM model settings are locked; model downloads to `~/.cache/lel/models/`.
|
|
- `-v/--verbose` enables verbose logs (including llama.cpp) with `llama::` prefix.
|