Contributing
vaak is Apache-2.0. Issues and pull requests are welcome at github.com/mirukullacode/vaak.
Development setup
Section titled “Development setup”git clone https://github.com/mirukullacode/vaakcd vaakpython -m venv .venv && source .venv/bin/activatepip install -e ".[all,dev]"pre-commit installdev adds pytest, ruff and mypy. Run the checks:
ruff check . && ruff format --check .mypy vaakpytestTests that need model weights are marked @pytest.mark.slow and skipped by default. pytest -m slow runs them; they download small models the first time.
Repository layout
Section titled “Repository layout”vaak/ Python package audio.py load_audio() metrics.py wer(), cer(), normalize_text() backends/ one file per backend, registry in __init__.py server/app.py FastAPI app cli.py vaak transcribe | serve | bench | modelsbench/ datasets.py, run.py, report.py, results/train/ finetune_whisper_lora.py, tiny_ctc_from_scratch.pyrunpod/ run_all.sh, Dockerfilehuggingface/ Space, model card, publish.pydocker/ API server Dockerfilewebsite/ this site (Astro Starlight)Adding a backend
Section titled “Adding a backend”- Create
vaak/backends/<name>.pywith a class that subclassesBackendfrombase.py. - Set
nameto the registry prefix.model_idis whatever follows the colon in the spec string. - Import the runtime inside
load(), not at module top level.vaak modelsmust stay fast and must not fail when an optional extra is missing. transcribe()must accept a float32 numpy array, resample ifsample_rate != 16000, and return aTranscriptwithrtfmeasured around the model call only.- Set
languagesto the ISO 639-1 codes the model supports, orNonefor multilingual. - Register it in
vaak/backends/__init__.pyand add the runtime to the right extra inpyproject.toml. - Add a test in
tests/backends/that runs on the smallest available checkpoint. - Document the spec in
website/src/content/docs/reference/model-specs.mdand add a row to the backends table on the landing page.
Adding a dataset
Section titled “Adding a dataset”Add a generator to bench/datasets.py that yields {"id", "audio", "text", "lang"} with audio as a 16 kHz float32 array. Register the key in the DATASETS dict. Document it on the benchmarks page.
Benchmarks and numbers
Section titled “Benchmarks and numbers”- Never type a benchmark number into the website. Rows come from
bench/results/*.jsonthroughbench/report.py. - Published numbers from papers go in the
referencearray ofwebsite/src/data/benchmarks.jsonwith"reproduced": falseand asourceURL. - Do not commit results from hardware you cannot name.
Website
Section titled “Website”cd websitenpm installnpm run devPages are Markdown or MDX in src/content/docs/. Run npm run build before opening a PR. Writing style: plain, short sentences, no marketing language, state limitations.
Pull requests
Section titled “Pull requests”- One change per PR.
- Describe what you measured, if anything, and on what hardware.
- Keep the public API in
ARCHITECTURE.mdin sync with the code. If a PR changes a route, a CLI flag or a dataclass field, update that file in the same PR.