Open-Source Wikis

/

Whisper

/

By the numbers

openai/whisper

By the numbers

A quantitative snapshot of the codebase. Data collected on 2026-04-30 against commit 04f449b8a437f1bbd3dba5c9f826aca972e7709a on branch main.

Size

The Python package is small. Most of the repository's bytes are in pretrained tokenizer assets and a couple of notebooks.

File / area Lines
whisper/decoding.py 826
whisper/transcribe.py 623
whisper/normalizers/english.py 550
whisper/tokenizer.py 395
whisper/timing.py 388
whisper/model.py 345
whisper/utils.py 318
whisper/__init__.py 161
whisper/audio.py 157
whisper/triton_ops.py 119
whisper/normalizers/basic.py 77
All whisper/*.py ~3,400
All tests/*.py ~210
Total Python 4,267
xychart-beta horizontal
    title "Python lines per file (top 10)"
    x-axis ["decoding.py", "transcribe.py", "english.py", "tokenizer.py", "timing.py", "model.py", "utils.py", "__init__.py", "audio.py", "triton_ops.py"]
    y-axis "Lines" 0 --> 900
    bar [826, 623, 550, 395, 388, 345, 318, 161, 157, 119]
Category Count
Python source files (whisper/) 14
Python test files (tests/) 6
GitHub workflows 2
Notebooks (notebooks/) 2
Top-level docs (README.md, CHANGELOG.md, model-card.md, data/README.md) 4

The repository carries some sizable non-source assets:

Asset Size Purpose
whisper/assets/gpt2.tiktoken 836 KB English-only BPE merges
whisper/assets/multilingual.tiktoken 817 KB Multilingual BPE merges
whisper/assets/mel_filters.npz 4.2 KB Precomputed 80- and 128-channel mel filterbanks
tests/jfk.flac 1.2 MB Test fixture (JFK inaugural clip)
approach.png 904 KB Architecture diagram embedded in README.md
language-breakdown.svg 273 KB Per-language WER chart referenced from README.md
notebooks/Multilingual_ASR.ipynb 5.7 MB Demo notebook

Activity

Commits per calendar year on main (commits authored, including merges):

xychart-beta horizontal
    title "Commits per year"
    x-axis ["2022", "2023", "2024", "2025", "2026 (YTD)"]
    y-axis "Commits" 0 --> 90
    bar [57, 79, 14, 16, 2]

Cumulative as of 2026-04-30: 168 commits across 167 entries in git log. Activity peaked in 2023 and has been mainly maintenance (CI, dependencies, security fixes) since 2024.

The most-changed Python files in the repository's history (by total commits touching the file):

File Commits touching it
whisper/transcribe.py ~30
whisper/decoding.py ~15
whisper/__init__.py ~15
whisper/tokenizer.py ~12
whisper/model.py ~12
whisper/timing.py ~10

Bot-attributed commits

git log on main shows 0 commits with dependabot[bot] or factory-droid[bot] co-authorship. GitHub Actions for Dependabot is configured (.github/dependabot.yml schedules weekly action updates), but those PRs land as human-authored commits in this history. This number is a lower bound on AI-assisted changes since inline AI tools leave no git trace.

Complexity

Largest functions and classes (qualitative; based on file scan):

  • transcribe() in whisper/transcribe.py: ~280 lines. Implements the file-level loop, fallback, segment slicing, and (when enabled) the word-timestamp + hallucination-silence heuristics. The longest single function in the repo.
  • cli() in whisper/transcribe.py: ~80 lines, mostly argparse setup.
  • DecodingTask in whisper/decoding.py: ~250 lines spread across init, _main_loop, run, and helpers.
  • BeamSearchDecoder in whisper/decoding.py: ~120 lines.
  • EnglishNumberNormalizer in whisper/normalizers/english.py: ~400 lines, dominated by hard-coded number-word and currency tables.

Test-to-code ratio: 6 test files / 14 source files (~0.43). Coverage is depth-oriented (one or two strong tests per module: tokenizer, audio, timing, normalizer, transcribe) rather than breadth-oriented.

Languages

The repository is essentially mono-language. ~98% of source-tree lines are Python. The remaining lines are YAML (CI / pre-commit), TOML (pyproject.toml), Markdown, and one .flake8 config.

xychart-beta horizontal
    title "Source lines by language"
    x-axis ["Python", "Markdown", "YAML", "TOML"]
    y-axis "Lines" 0 --> 4500
    bar [4267, 320, 130, 50]

(Line counts for Markdown / YAML / TOML are approximate.)

Dependencies

Runtime dependencies declared in pyproject.toml:

Dependency Notes
more-itertools Used in whisper/normalizers/english.py (windowed)
numba JIT for CPU DTW / backtrace
numpy Array math
tiktoken BPE tokenizer
torch The model
tqdm Progress bars in download and transcribe
triton>=2 x86_64 Linux only; CUDA kernels for DTW + median filter

Dev extras: black, flake8, isort, pytest, scipy.

The transitive footprint is dominated by torch. There is no networking client, web framework, or database driver — everything is local computation plus an ffmpeg subprocess.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

By the numbers – Whisper wiki | Factory