# System map — openai/whisper

> Canonical page: https://codevetter.com/unpack/whisper/system-map

# System map — openai/whisper

Scanned commit 86098128c0b4f24f0e2aa2994de830614b474227 (2026-08-31). Generated by codevetter codevetter 1.12.0 on 2026-09-22.

The repo is a single flat Python package, `whisper/`, plus a `tests/` pytest suite, GitHub Actions CI, and evaluation docs/notebooks. The CLI entrypoint `whisper.transcribe:cli` (also reachable via `python -m whisper`) parses ~30 argparse options, loads a checkpoint through `load_model` in `whisper/__init__.py`, and runs `transcribe()`. Checkpoints are runtime downloads from openaipublic.azureedge.net, verified by a SHA256 embedded in the URL and cached under ~/.cache/whisper. The model itself is a standard Transformer encoder/decoder defined in model.py; decoding.py implements the sampling engine (greedy/beam, logit filters, KV-cache hooks); audio.py, tokenizer.py, timing.py, utils.py, and triton_ops.py cover the audio pipeline, BPE vocab, DTW alignment, output writers, and optional CUDA kernels respectively.
- The console script `whisper` maps to `whisper.transcribe:cli` in pyproject `[project.scripts]`, and `whisper/__main__.py` calls the same `cli()` function, so `whisper` and `python -m whisper` are equivalent entrypoints. — [pyproject.toml#L35](https://github.com/openai/whisper/blob/86098128c0b4f24f0e2aa2994de830614b474227/pyproject.toml#L35) [whisper/__main__.py](https://github.com/openai/whisper/blob/86098128c0b4f24f0e2aa2994de830614b474227/whisper/__main__.py) [whisper/transcribe.py#L517](https://github.com/openai/whisper/blob/86098128c0b4f24f0e2aa2994de830614b474227/whisper/transcribe.py#L517)
- The package is organized as flat modules under whisper/: audio.py (mel pipeline), model.py (nn.Modules), decoding.py (sampling engine), tokenizer.py (tiktoken wrapper), timing.py (DTW alignment), transcribe.py (orchestration + CLI), utils.py (writers/helpers), normalizers/ (evaluation text normalization), triton_ops.py (CUDA kernels). — [whisper/audio.py](https://github.com/openai/whisper/blob/86098128c0b4f24f0e2aa2994de830614b474227/whisper/audio.py) [whisper/model.py](https://github.com/openai/whisper/blob/86098128c0b4f24f0e2aa2994de830614b474227/whisper/model.py) [whisper/decoding.py](https://github.com/openai/whisper/blob/86098128c0b4f24f0e2aa2994de830614b474227/whisper/decoding.py) [whisper/tokenizer.py](https://github.com/openai/whisper/blob/86098128c0b4f24f0e2aa2994de830614b474227/whisper/tokenizer.py) [whisper/timing.py](https://github.com/openai/whisper/blob/86098128c0b4f24f0e2aa2994de830614b474227/whisper/timing.py) [whisper/transcribe.py](https://github.com/openai/whisper/blob/86098128c0b4f24f0e2aa2994de830614b474227/whisper/transcribe.py)
- whisper/__init__.py is the public API surface: it re-exports load_audio, log_mel_spectrogram, pad_or_trim, decode, detect_language, DecodingOptions, DecodingResult, Whisper, ModelDimensions, transcribe, and __version__, and holds the _MODELS download-URL table plus load_model(). — [whisper/__init__.py#L11-32](https://github.com/openai/whisper/blob/86098128c0b4f24f0e2aa2994de830614b474227/whisper/__init__.py#L11-L32)
- Model weights are downloaded at runtime from openaipublic.azureedge.net URLs in _MODELS; the expected SHA256 is the second-to-last URL path segment, checked both before reuse of a cached file and after download, defaulting to $XDG_CACHE_HOME/whisper or ~/.cache/whisper. — [whisper/__init__.py#L17-95](https://github.com/openai/whisper/blob/86098128c0b4f24f0e2aa2994de830614b474227/whisper/__init__.py#L17-L95)
- Whisper is a conventional encoder-decoder Transformer: AudioEncoder applies two Conv1d layers (second stride 2), adds sinusoidal positional embeddings, then ResidualAttentionBlocks; TextDecoder uses learned positional embeddings, cross-attention blocks, a causal mask buffer, and tied output logits computed against token_embedding.weight. — [whisper/model.py#L181-256](https://github.com/openai/whisper/blob/86098128c0b4f24f0e2aa2994de830614b474227/whisper/model.py#L181-L256)
- ffmpeg is a hard external dependency: load_audio() spawns `ffmpeg -nostdin -threads 0 -i <file> -f s16le -ac 1 -acodec pcm_s16le -ar 16000 -` and parses stdout as int16 scaled to float32. — [whisper/audio.py#L42-62](https://github.com/openai/whisper/blob/86098128c0b4f24f0e2aa2994de830614b474227/whisper/audio.py#L42-L62) [README.md](https://github.com/openai/whisper/blob/86098128c0b4f24f0e2aa2994de830614b474227/README.md)
- Declared dependencies are more-itertools, numba, numpy, tiktoken, torch, tqdm, and triton>=2 (Linux x86_64 only); Python >=3.8 is required. — [pyproject.toml#L24-32](https://github.com/openai/whisper/blob/86098128c0b4f24f0e2aa2994de830614b474227/pyproject.toml#L24-L32) [requirements.txt](https://github.com/openai/whisper/blob/86098128c0b4f24f0e2aa2994de830614b474227/requirements.txt)
- Binary assets ship inside the package: whisper/assets/gpt2.tiktoken and multilingual.tiktoken BPE vocab files, mel_filters.npz (80- and 128-band filterbanks), and normalizers/english.json (UK→US spelling map), all declared in MANIFEST.in. — [MANIFEST.in](https://github.com/openai/whisper/blob/86098128c0b4f24f0e2aa2994de830614b474227/MANIFEST.in) [whisper/tokenizer.py#L330-336](https://github.com/openai/whisper/blob/86098128c0b4f24f0e2aa2994de830614b474227/whisper/tokenizer.py#L330-L336) [whisper/audio.py#L105](https://github.com/openai/whisper/blob/86098128c0b4f24f0e2aa2994de830614b474227/whisper/audio.py#L105) [whisper/normalizers/english.py#L460-461](https://github.com/openai/whisper/blob/86098128c0b4f24f0e2aa2994de830614b474227/whisper/normalizers/english.py#L460-L461)
- The Whisper class binds module-level functions as class attributes (`transcribe = transcribe_function`, `decode = decode_function`, `detect_language = detect_language_function`), so `model.transcribe(...)`, `model.decode(...)`, and `model.detect_language(...)` work without separate methods. — [whisper/model.py#L350-352](https://github.com/openai/whisper/blob/86098128c0b4f24f0e2aa2994de830614b474227/whisper/model.py#L350-L352) [whisper/__init__.py#L12-14](https://github.com/openai/whisper/blob/86098128c0b4f24f0e2aa2994de830614b474227/whisper/__init__.py#L12-L14)
- Optional GPU acceleration lives in triton_ops.py (Triton JIT kernels for DTW and median filter); callers in timing.py wrap kernel launches in try/except and fall back to numba-JIT CPU implementations with a warning. — [whisper/triton_ops.py](https://github.com/openai/whisper/blob/86098128c0b4f24f0e2aa2994de830614b474227/whisper/triton_ops.py) [whisper/timing.py#L36-54](https://github.com/openai/whisper/blob/86098128c0b4f24f0e2aa2994de830614b474227/whisper/timing.py#L36-L54) [whisper/timing.py#L141-151](https://github.com/openai/whisper/blob/86098128c0b4f24f0e2aa2994de830614b474227/whisper/timing.py#L141-L151)
- Distribution is the PyPI package `openai-whisper` with dynamic version read from whisper/version.py (__version__ = "20250625"); python-publish.yml triggers on commits to main whose message matches `^Release <v>` and uploads via twine. — [pyproject.toml#L7-42](https://github.com/openai/whisper/blob/86098128c0b4f24f0e2aa2994de830614b474227/pyproject.toml#L7-L42) [whisper/version.py](https://github.com/openai/whisper/blob/86098128c0b4f24f0e2aa2994de830614b474227/whisper/version.py) [.github/workflows/python-publish.yml#L12-37](https://github.com/openai/whisper/blob/86098128c0b4f24f0e2aa2994de830614b474227/.github/workflows/python-publish.yml#L12-L37)
- Build/test: `pip install .[dev]` installs setuptools-built package plus pytest/black/flake8/isort/scipy; CI runs pre-commit then `pytest -k 'not test_transcribe or test_transcribe[tiny] or test_transcribe[tiny.en]' -m 'not requires_cuda'` on a 9-cell Python×PyTorch matrix. — [pyproject.toml#L33](https://github.com/openai/whisper/blob/86098128c0b4f24f0e2aa2994de830614b474227/pyproject.toml#L33) [.github/workflows/test.yml#L39-79](https://github.com/openai/whisper/blob/86098128c0b4f24f0e2aa2994de830614b474227/.github/workflows/test.yml#L39-L79)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
