36 lines
1.7 KiB
Markdown
36 lines
1.7 KiB
Markdown
# Repository Guidelines
|
|
|
|
## Project Structure & Module Organization
|
|
|
|
- `lel.sh` is the primary entrypoint; it records audio, runs `whisper`, and prints the transcript.
|
|
- `env/` is a local Python virtual environment (optional) used to install runtime dependencies.
|
|
- There are no separate source, test, or asset directories at this time.
|
|
|
|
## Build, Test, and Development Commands
|
|
|
|
- `./lel.sh` streams transcription from the microphone until you press Enter.
|
|
- Example with overrides: `WHISPER_MODEL=small WHISPER_LANG=pt WHISPER_DEVICE=cuda ./lel.sh`.
|
|
- Dependencies expected on PATH: `ffmpeg` and `whisper` (the OpenAI Whisper CLI).
|
|
|
|
## 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 controlled via `WHISPER_FFMPEG_IN` (default `pulse:default`), e.g., `alsa:default`.
|
|
- Streaming is on by default; set `WHISPER_STREAM=0` to transcribe after recording.
|
|
- Segment duration for streaming is `WHISPER_SEGMENT_SEC` (default `5`).
|
|
- Model, language, device, and extra args can be set with `WHISPER_MODEL`, `WHISPER_LANG`, `WHISPER_DEVICE`, and `WHISPER_EXTRA_ARGS`.
|