Skip to main content

whisper(ml)x

Fast, accurate speech recognition on Apple Silicon — powered by MLX.

Documentation

A fork of WhisperX with the inference backend replaced by mlx-whisper, running natively on Apple Silicon via MLX. Word-level timestamps, speaker diarization, and VAD are all retained.

  • ⚡️ MLX inference — runs on Apple Silicon GPU via unified memory
  • 🎯 Word-level timestamps via wav2vec2 forced alignment
  • 👥 Speaker diarization via pyannote-audio
  • 🗣️ VAD preprocessing via pyannote or silero

Installation

pip install whispermlx

Or with uv:

uv add whispermlx

Usage

CLI

# Auto-downloads mlx-community/whisper-large-v3-mlx on first run
whispermlx audio.mp3 --model large-v3

# With speaker diarization
whispermlx audio.mp3 --model large-v3 --diarize --hf_token YOUR_TOKEN

# Use any mlx-community model directly
whispermlx audio.mp3 --model mlx-community/whisper-large-v3-turbo

# Carry transcript context across VAD chunks (better punctuation / proper nouns)
whispermlx audio.mp3 --model large-v3 --interleaved_context

Accelerated forced alignment (optional)

pip install "whispermlx[fast]"
# or: pip install numba

Alignment uses dynamic programming over the wav2vec2 emissions, a Python loop that dominates long-audio alignment time. With Numba installed, whispermlx automatically JIT-compiles the trellis and backtrack loops (up to ~100× faster in our testing, with bit-identical results). Without Numba it silently falls back to native PyTorch — zero configuration either way.

Python

import whispermlx

# Short name — auto-maps to mlx-community/whisper-large-v3-mlx
model = whispermlx.load_model("large-v3", device="cpu")
result = model.transcribe("audio.mp3")
print(result["segments"])

# With alignment
model_a, metadata = whispermlx.load_align_model(language_code=result["language"], device="cpu")
result = whispermlx.align(result["segments"], model_a, metadata, "audio.mp3", device="cpu")

# With diarization
from whispermlx.diarize import DiarizationPipeline
diarize_model = DiarizationPipeline(token="YOUR_HF_TOKEN", device="cpu")
diarize_segments = diarize_model("audio.mp3")
result = whispermlx.assign_word_speakers(diarize_segments, result)

Model Names

Short names are automatically mapped to their mlx-community equivalents. Full HF repo IDs also work.

Short name HF repo
tiny, base, small, medium mlx-community/whisper-{name}-mlx
large-v3 mlx-community/whisper-large-v3-mlx
large-v3-turbo / turbo mlx-community/whisper-large-v3-turbo

Comparison with WhisperX

whispermlx tracks upstream WhisperX's pipeline and API, with the inference backend swapped to MLX. Everything downstream of ASR (alignment, diarization, output formats) is unchanged. Upstream reviewed through whisperX@8d8e43b (2026-11-21).

Feature parity

Feature WhisperX whispermlx Notes
VAD preprocessing ✅ pyannote / silero ✅ pyannote / silero Identical
Word-level timestamps ✅ wav2vec2 alignment ✅ wav2vec2 alignment Identical; adds Indonesian (id) model
Speaker diarization ✅ pyannote-audio ✅ pyannote-audio Identical
Output formats srt, vtt, txt, tsv, json, aud srt, vtt, txt, tsv, json, aud Identical
CLI flags Full set Full set Identical; adds --log-level
Python API load_model, transcribe, align, assign_word_speakers Same signatures Drop-in compatible
Batched inference ✅ context-aware batching ❌ per-segment batch_size accepted but unused; --interleaved_context runs as sequential context carry-over instead of batched streams
CUDA / NVIDIA GPU ✅ ❌ Apple Silicon only
Ascend NPU / other non-CUDA accelerators ✅ auto-detected, with CTranslate2 CPU fallback ❌ No NPU path in the MLX backend; Apple Silicon only
Apple Silicon GPU ❌ (CPU only) ✅ MLX unified memory Native, no CUDA

API compatibility

Parameter WhisperX whispermlx
device Auto-detected (CUDA > NPU > CPU); controls ASR + PyTorch models Defaults to mps; controls VAD/alignment/diarization only; MLX inference auto-uses GPU
compute_type float16 / float32 / int8 Accepted, ignored
device_index, threads, download_root, local_files_only, use_auth_token Used Accepted for compatibility, ignored
asr_options Full faster-whisper options Only initial_prompt and hotwords are used
--model faster-whisper model names Short names map to mlx-community repos; full HF repo IDs also work

Dependencies

Purpose WhisperX whispermlx
ASR backend ctranslate2 + faster-whisper mlx-whisper
Alignment transformers (wav2vec2) transformers (wav2vec2)
VAD + diarization pyannote-audio pyannote-audio
Torch CUDA/CPU wheels CPU wheels only
torchaudio required Required (CPU wheels); falls back to Hugging Face checkpoints if torchaudio is unusable
Extra triton, torchcodec tqdm; optional numba via [fast]

Speaker Diarization

Requires a Hugging Face access token and acceptance of the pyannote speaker-diarization-community-1 model agreement.

Acknowledgements

Built on top of WhisperX by Max Bain et al., mlx-whisper, pyannote-audio, and OpenAI Whisper.

@article{bain2022whisperx,
  title={WhisperX: Time-Accurate Speech Transcription of Long-Form Audio},
  author={Bain, Max and Huh, Jaesung and Han, Tengda and Zisserman, Andrew},
  journal={INTERSPEECH 2023},
  year={2023}
}

Metadata

Release files for whispermlx 3.15.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for whispermlx 3.15.0
File Size Uploaded Provenance Actions
whispermlx-3.15.0.tar.gz 16.5 MB Without provenance Details for whispermlx-3.15.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for whispermlx 3.15.0
File Interpreter ABI Platform Actions
whispermlx-3.15.0-py3-none-any.whl Python 3 none any Details for whispermlx-3.15.0-py3-none-any.whl

Total release size: 33.0 MB

Release files / whispermlx-3.15.0.tar.gz

Download URL whispermlx-3.15.0.tar.gz
Size 16.5 MB
Tags Source
SHA-256 checksum
How to use checksums
3d30c3f68fb88135995cfd8af92bc4b3c5709b1eeed1696888ac36fba3f77d1d
BLAKE2b-256 checksum
How to use checksums
1632a6ff35dc29db85ec1c13438275dd92fcf0b8485097501e0a76a67976da54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / whispermlx-3.15.0-py3-none-any.whl

Download URL whispermlx-3.15.0-py3-none-any.whl
Size 16.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
4bdd239e9e445638a780fd1787e91d9eefc8b3486de68ef1ef19506f0902e697
BLAKE2b-256 checksum
How to use checksums
d3f642f710e9ec1ddae9086cec7becc5378e056d33f01e329f78cb783aa7d39c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for whispermlx 3.15.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page