Install and use#

git clone https://github.com/AlveeeRahman/WhatAreYouSaying && cd WhatAreYouSaying
python -m venv .venv && . .venv/bin/activate
pip install --extra-index-url https://download.pytorch.org/whl/cu128 -r requirements.txt   # or /cpu
pip install --no-deps -e .
pytest tests -q

WAYS needs Python 3.12 in any virtual environment. The first call downloads the model from the Hugging Face Hub and, with --aadd, the AADD checkpoint (about 180 MB for v3), so it needs internet once. Add --revision <commit> to pin the model snapshot. A GPU is optional for one clip. The repository does not assume a home directory or a machine layout. The scripts call whatever python is on the path (or PY=), the experiments read a data folder through WAYS_DATA=/path/to/it (layout in experiments/common.py), and every path in a provenance file is written relative to this repository or as $WAYS_DATA/.... Re-running the experiments is described in docs/reproducibility.md.

ways explain clip.wav --backend hf-whisper --model openai/whisper-base --aadd --figure --out out/
ways quality clip.wav                      # just the AADD timeline
import soundfile as sf
from ways import explain, load_backend
from ways.metrics import token_summary, clip_summary
from ways.quality import Quality

wav, sr = sf.read("clip.wav", dtype="float32")          # 16 kHz mono
att = explain(load_backend("hf-whisper", "openai/whisper-base"), wav)   # delta, rel, flip: [tokens, 8 bands, patches]
probs = Quality("v3").frames(wav)                        # AADD, [frames of 20 ms, 12 classes]
rows = token_summary(att, probs)                         # one dict per token: top patch, band shares, focus ratio
print(clip_summary(att, rows, probs))                    # att.save(path) / Attribution.load(path) keep the arrays

Command line lists every command and option.