Extensions for mlx-whisper on Apple Silicon:
- VAD (Voice Activity Detection) — skip silence using Silero VAD
- Speaker diarization — identify who is speaking
- Batched decoding — process multiple segments simultaneously (see benchmarks)
- Flash Attention —
mx.fast.scaled_dot_product_attention
Tested on a 1h14m Russian lecture video.
| Model | Time | Realtime Factor | 5h video estimate |
|---|---|---|---|
| whisper-small (sequential) | 3.3 min | 23.6x RT | ~16 min |
| whisper-turbo (sequential) | 6.0 min | 12.4x RT | ~24 min |
| Original mlx-whisper (turbo) | 6.5 min | 11.5x RT | ~26 min |
Tip: If you're using whisper-turbo (the default), switch to whisper-small for 2x speedup with comparable quality.
Batching does NOT help on M2 8GB — the memory bandwidth overhead exceeds the parallelism benefit:
| Config | Time | RTF | vs Sequential |
|---|---|---|---|
| whisper-small batch=1 | 3.3 min | 23.6x | baseline |
| whisper-small batch=12 | 4.6 min | 16.3x | 0.7x (slower) |
| whisper-turbo batch=4 | 8.9 min | 8.3x | 0.67x (slower) |
Batching may help on machines with 16GB+ RAM and larger models (large-v3). On 8GB, sequential is fastest.
from mlx_whisper.vad import detect_speech, merge_segments
from mlx_whisper.audio import load_audio
audio = load_audio("meeting_with_pauses.mp3")
speech = detect_speech(audio)
merged = merge_segments(speech)
# Useful for audio with lots of pauses/silenceBest for: meetings, interviews, surveillance audio with lots of silence.
from mlx_whisper import transcribe
from mlx_whisper.speaker_diarize import diarize_audio, assign_speakers
result = transcribe("meeting.mp3")
speakers = diarize_audio("meeting.mp3", num_speakers=2)
result["segments"] = assign_speakers(result["segments"], speakers)
for seg in result["segments"]:
print(f"[{seg['speaker']}] {seg['text']}")from mlx_whisper import transcribe
# Only use batch_size > 1 on machines with 16GB+ RAM
result = transcribe("audio.mp3", batch_size=4,
path_or_hf_repo="mlx-community/whisper-large-v3-mlx")git clone https://github.com/ilyasmukiev/mlx-whisper-fast.git
cd mlx-whisper-fast
pip install -e .
# Optional
pip install onnxruntime # for VAD
pip install diarize # for speaker diarization- macOS with Apple Silicon (M1/M2/M3/M4)
- Python 3.10+
- MLX >= 0.5.0
MIT License
- mlx-whisper by Apple
- WhisperX — architecture reference
- Silero VAD — voice activity detection