faster-whisper

Fast, low-memory Whisper speech-to-text transcription powered by CTranslate2.

Library
PyPI
v1.2.1
25,602 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
47 /100 Fair
Development Activity 0
Maintenance 32
Community 64
Maturity 52
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
76 /100 Good
Architecture 75
Code Quality 78
Innovation 80
Learning Curve 70

faster-whisper is a reimplementation of OpenAI’s Whisper speech recognition model on top of CTranslate2, a highly optimized inference engine for Transformer models. Swapping the reference PyTorch implementation for CTranslate2 makes transcription up to 4x faster than openai/whisper at the same accuracy, while using significantly less memory — an effect that compounds further with 8-bit quantization on both CPU and GPU.

The library exposes a single WhisperModel class that downloads and runs any Whisper checkpoint (the standard OpenAI sizes, community distil-whisper models, or a custom fine-tune converted to CTranslate2 format) with no FFmpeg system dependency — audio decoding goes through the bundled PyAV library instead. Built-in Silero VAD filtering strips silence before it reaches the model, BatchedInferencePipeline runs multiple audio chunks through the model in parallel for further GPU throughput, and word-level timestamps are available via a forced-alignment pass. It has become a common backend for other projects (WhisperX, WhisperLive, whisper-diarization, speaches) that need fast Whisper inference without touching CTranslate2 or the alignment logic directly.

What You Get

  • A WhisperModel class that downloads any Whisper size (tiny through large-v3, turbo) or a custom-converted checkpoint from the Hugging Face Hub and runs it on CPU or GPU
  • BatchedInferencePipeline, a drop-in replacement for WhisperModel.transcribe that batches audio chunks for higher GPU throughput
  • Built-in Silero VAD filtering (vad_filter=True) to skip non-speech audio before it reaches the model
  • Word-level timestamps via a forced-alignment pass over the decoded tokens
  • 8-bit and float16 quantization options for both CPU and GPU inference (compute_type="int8", "int8_float16", etc.)
  • Audio decoding through the bundled PyAV/FFmpeg libraries, so no system FFmpeg install is required

Common Use Cases

  • Self-hosted transcription services that need OpenAI-Whisper-level accuracy without the GPU memory and latency cost of the reference implementation
  • Real-time or near-real-time captioning pipelines built on top of the batched inference API
  • Speaker-diarization and alignment pipelines (WhisperX-style) that need fast, word-timestamped Whisper output as an upstream stage
  • Podcast, meeting, and video transcription tools that run entirely offline/on-prem
  • Backend engine for OpenAI-API-compatible transcription servers

Under The Hood

Architecture The library centers on a WhisperModel class (in faster_whisper/transcribe.py) that wraps a ctranslate2.models.Whisper instance alongside a Hugging Face tokenizers.Tokenizer and a FeatureExtractor (audio.py/feature_extractor.py). Its transcribe() method drives generate_segments(), which seeks through the audio frame-by-frame, calls generate_with_fallback() for temperature-based decoding retries, _split_segments_by_timestamps() to break decoder output into timed segments, and an optional add_word_timestamps() alignment pass. When VAD filtering is enabled, vad.py’s get_speech_timestamps()/collect_chunks() trims silence before features are even extracted. BatchedInferencePipeline reuses the same WhisperModel but batches multiple audio chunks through generate_segment_batched() for GPU throughput. Supporting modules (audio, feature_extractor, tokenizer, vad) are cleanly separated single-purpose files, but the core orchestration logic is concentrated in one large transcribe.py, so most non-trivial changes to decoding behavior touch that file directly.

Tech Stack Python 3.9+, built on ctranslate2 (the C++ inference engine that does the actual model execution), huggingface_hub for downloading and caching converted Whisper weights, tokenizers for the Whisper BPE tokenizer, onnxruntime to run the bundled Silero VAD model, and av (PyAV) for FFmpeg-free audio decoding — a deliberate difference from openai/whisper, which shells out to a system FFmpeg binary. Packaged with plain setuptools/setup.py for PyPI distribution. CI (GitHub Actions) runs Black, isort, and Flake8 checks plus pytest on every push and PR.

Code Quality A real pytest suite exists (tests/test_tokenizer.py, test_transcribe.py, test_utils.py) covering tokenizer behavior, end-to-end transcription, and model-download utilities, and CI enforces formatting/lint/tests on every change. Extensive docstrings (notably WhisperModel.__init__) document parameters in detail. Error handling favors explicit ValueError/assert over silent fallbacks (e.g. invalid model size, negative timestamps). Type hints are used throughout via dataclasses and typing.Optional/Union, though there’s no dedicated static type-checking step in CI, and the core transcription logic is concentrated in one large module rather than split into smaller, independently testable units.

What Makes It Unique The core contribution is swapping Whisper’s reference PyTorch execution for CTranslate2, a purpose-built fast-inference engine, which yields substantially lower latency and memory use — compounded further by CTranslate2’s native int8/float16 quantization rather than relying on generic PyTorch-level optimization. It goes further than a thin CTranslate2 wrapper by integrating Silero VAD filtering directly into the transcription pipeline and implementing its own word-level alignment on top of raw decoder output, rather than leaving those concerns to the caller. The innovation is concentrated in the inference/serving layer rather than the model architecture itself, but it’s a widely adopted foundation — multiple downstream projects (WhisperX, WhisperLive, speaches) build directly on top of it instead of re-solving the same problem.

Used by 5 apps in this directory

Python
100%
MIT

Graphify

AI Agents

121,917

A YC-backed, open-source knowledge graph skill for AI coding assistants — type /graphify and it maps your entire project (code, docs, PDFs, images, videos) into a queryable graph instead of grepping through files.

View details
83
Repo Health
73
Technical
72
Dependency
Built with
Python 100%
Updated 5 days ago
Python
37%
Other

Open WebUI

AI Agents · AI Assistants

153,390

The extensible, privacy-first AI platform that runs Ollama, OpenAI, and any LLM backend behind a polished, feature-packed web interface.

View details
91
Repo Health
75
Technical
66
Dependency
Built with
Python 37%
Svelte 34%
JavaScript 21%
Updated 4 days ago
TypeScript
93%
MIT

OpenReel Video

Video Editors

5,211

A browser-based, GPU-accelerated video editor with multi-track timelines, color grading, and 4K export — no uploads, no installs, no watermarks.

View details
66
Repo Health
80
Technical
74
Dependency
Built with
TypeScript 93%
Updated 1 months ago
Python
67%
Apache 2.0

SurfSense

AI Assistants · Search

16,270

The open-source, unlimited NotebookLM alternative with real-time collaboration, a desktop app, and no vendor lock-in.

View details
87
Repo Health
71
Technical
66
Dependency
Built with
Python 67%
TypeScript 30%
Updated 6 days ago
AGPL 3.0

VoiceStudio

Mcp · Music Audio · Voice AI

50,643

Open-source, fully local ElevenLabs alternative for voice cloning, voice design, video dubbing, dictation, transcription and audiobooks, with a local API and MCP server for agents.

View details
84
Repo Health
83
Technical
70
Dependency

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers