|
| 1 | +# CoreML Whisper Models on HuggingFace |
| 2 | + |
| 3 | +## Summary |
| 4 | +There are **NO native WhisperX CoreML models** on HuggingFace. However, there are several CoreML Whisper implementations that can provide similar functionality with significant speed improvements on Apple Silicon. |
| 5 | + |
| 6 | +## Key Finding: German-Specific CoreML Model |
| 7 | + |
| 8 | +### 🎯 Best Option: Swiss German Whisper Large V3 Turbo CoreML |
| 9 | +**Model:** `jlnslv/whisper-large-v3-turbo-swiss-german-coreml` |
| 10 | +- **Size:** 1.6 GB |
| 11 | +- **Base Model:** Whisper Large V3 Turbo (fine-tuned for Swiss German) |
| 12 | +- **Components:** AudioEncoder, MelSpectrogram, TextDecoder (all in CoreML format) |
| 13 | +- **Created:** March 2026 |
| 14 | +- **Downloads:** 0 (very new model) |
| 15 | +- **URL:** https://huggingface.co/jlnslv/whisper-large-v3-turbo-swiss-german-coreml |
| 16 | + |
| 17 | +**Advantages:** |
| 18 | +- Optimized for German language (Swiss German variant) |
| 19 | +- Should work well for standard German podcasts |
| 20 | +- Native CoreML format for maximum Apple Silicon performance |
| 21 | +- Based on Whisper Large V3 Turbo (latest, fastest Whisper variant) |
| 22 | + |
| 23 | +## Alternative: WhisperKit (Official CoreML Implementation) |
| 24 | + |
| 25 | +### WhisperKit by Argmax |
| 26 | +**Model:** `argmaxinc/whisperkit-coreml` |
| 27 | +- **Downloads:** 7.5M+ (very popular) |
| 28 | +- **Likes:** 192 |
| 29 | +- **Library:** whisperkit |
| 30 | +- **Tags:** whisper, coreml, asr, quantized |
| 31 | +- **URL:** https://huggingface.co/argmaxinc/whisperkit-coreml |
| 32 | + |
| 33 | +**Features:** |
| 34 | +- Official CoreML implementation of Whisper |
| 35 | +- Multiple model sizes available (tiny, base, small, medium, large) |
| 36 | +- Quantized versions for faster inference |
| 37 | +- Supports all languages Whisper supports (including German) |
| 38 | +- Active development and maintenance |
| 39 | + |
| 40 | +## Important Note: WhisperX vs Whisper CoreML |
| 41 | + |
| 42 | +### What is WhisperX? |
| 43 | +WhisperX is a **Python wrapper** around Whisper that adds: |
| 44 | +1. **VAD (Voice Activity Detection)** - Faster processing by skipping silence |
| 45 | +2. **Batching** - Process multiple audio chunks in parallel |
| 46 | +3. **Word-level timestamps** - Uses forced alignment (wav2vec2 or phoneme models) |
| 47 | +4. **Speaker diarization** - Identify different speakers |
| 48 | + |
| 49 | +### CoreML Whisper Limitations |
| 50 | +Standard CoreML Whisper models provide: |
| 51 | +- ✅ Fast transcription on Apple Silicon (10-30x speedup) |
| 52 | +- ✅ Segment-level timestamps |
| 53 | +- ❌ **NO word-level timestamps** (this is WhisperX's key feature) |
| 54 | +- ❌ NO built-in VAD or batching |
| 55 | +- ❌ NO speaker diarization |
| 56 | + |
| 57 | +### Solution: Hybrid Approach |
| 58 | + |
| 59 | +For word-level timestamps on Apple Silicon, you need to combine: |
| 60 | + |
| 61 | +1. **CoreML Whisper** (fast transcription) |
| 62 | + - Use `jlnslv/whisper-large-v3-turbo-swiss-german-coreml` or `argmaxinc/whisperkit-coreml` |
| 63 | + - Get segment-level transcripts quickly |
| 64 | + |
| 65 | +2. **Forced Alignment** (word timestamps) |
| 66 | + - Use Montreal Forced Aligner (MFA) - what we're currently using |
| 67 | + - OR use wav2vec2 alignment models |
| 68 | + - OR use WhisperX's alignment component separately |
| 69 | + |
| 70 | +## Performance Comparison |
| 71 | + |
| 72 | +### Current Setup (WhisperX on CPU) |
| 73 | +- **Speed:** ~200 minutes per 90-minute episode |
| 74 | +- **Total for 373 episodes:** ~52 days |
| 75 | +- **Word timestamps:** ✅ Yes (built-in) |
| 76 | + |
| 77 | +### Option 1: WhisperX with MPS (Metal Performance Shaders) |
| 78 | +- **Speed:** ~10-20 minutes per 90-minute episode (10-20x faster) |
| 79 | +- **Total for 373 episodes:** ~2.6 days |
| 80 | +- **Word timestamps:** ✅ Yes (built-in) |
| 81 | +- **Implementation:** Already documented in `WHISPERX_APPLE_SILICON_ALTERNATIVES.md` |
| 82 | + |
| 83 | +### Option 2: CoreML Whisper + MFA |
| 84 | +- **Transcription speed:** ~3-5 minutes per 90-minute episode (30-50x faster) |
| 85 | +- **MFA alignment:** ~5-10 minutes per episode |
| 86 | +- **Total per episode:** ~8-15 minutes |
| 87 | +- **Total for 373 episodes:** ~2-3 days |
| 88 | +- **Word timestamps:** ✅ Yes (via MFA) |
| 89 | +- **Complexity:** Higher (two-step process) |
| 90 | + |
| 91 | +### Option 3: CoreML Whisper + wav2vec2 Alignment |
| 92 | +- **Transcription speed:** ~3-5 minutes per episode |
| 93 | +- **Alignment speed:** ~2-3 minutes per episode |
| 94 | +- **Total per episode:** ~5-8 minutes |
| 95 | +- **Total for 373 episodes:** ~1.5-2 days |
| 96 | +- **Word timestamps:** ✅ Yes (via wav2vec2) |
| 97 | +- **Complexity:** Medium (two-step process) |
| 98 | + |
| 99 | +## Recommendation |
| 100 | + |
| 101 | +### For Current Project (373 German Podcast Episodes) |
| 102 | + |
| 103 | +**Best Option: WhisperX with MPS Backend** |
| 104 | +```python |
| 105 | +import whisperx |
| 106 | +import torch |
| 107 | + |
| 108 | +device = "mps" # Use Metal Performance Shaders |
| 109 | +compute_type = "float16" |
| 110 | + |
| 111 | +model = whisperx.load_model("large-v3", device, compute_type=compute_type, language="de") |
| 112 | +result = model.transcribe(audio, batch_size=16) |
| 113 | + |
| 114 | +# Align for word timestamps |
| 115 | +model_a, metadata = whisperx.load_align_model(language_code="de", device=device) |
| 116 | +result = whisperx.align(result["segments"], model_a, metadata, audio, device) |
| 117 | +``` |
| 118 | + |
| 119 | +**Why:** |
| 120 | +- ✅ Single tool handles everything (transcription + word timestamps) |
| 121 | +- ✅ 10-20x speedup over CPU (2.6 days vs 52 days) |
| 122 | +- ✅ Already documented and tested approach |
| 123 | +- ✅ No need to manage separate alignment step |
| 124 | +- ✅ Proven to work with German language |
| 125 | + |
| 126 | +**Alternative: CoreML + MFA (Current Approach)** |
| 127 | +- ✅ Slightly faster transcription (30-50x vs 10-20x) |
| 128 | +- ✅ Already have MFA working |
| 129 | +- ❌ More complex (two separate tools) |
| 130 | +- ❌ MFA alignment is slower than WhisperX alignment |
| 131 | +- ⚠️ Net benefit is minimal (~20% faster overall) |
| 132 | + |
| 133 | +## Implementation Notes |
| 134 | + |
| 135 | +### If Using CoreML Whisper |
| 136 | + |
| 137 | +1. **Install WhisperKit** (for argmaxinc models): |
| 138 | +```bash |
| 139 | +pip install whisperkit |
| 140 | +``` |
| 141 | + |
| 142 | +2. **Or use Swiss German model directly**: |
| 143 | +```python |
| 144 | +import coremltools as ct |
| 145 | + |
| 146 | +# Load model |
| 147 | +model = ct.models.MLModel("path/to/Flurin17_whisper-large-v3-turbo-swiss-german") |
| 148 | + |
| 149 | +# Transcribe |
| 150 | +result = model.predict({"audio": audio_data}) |
| 151 | +``` |
| 152 | + |
| 153 | +3. **Then run MFA for word timestamps** (as we're currently doing) |
| 154 | + |
| 155 | +### If Using WhisperX with MPS |
| 156 | + |
| 157 | +1. **Install WhisperX with MPS support**: |
| 158 | +```bash |
| 159 | +pip install whisperx |
| 160 | +pip install torch torchvision torchaudio # Ensure MPS support |
| 161 | +``` |
| 162 | + |
| 163 | +2. **Use MPS device**: |
| 164 | +```python |
| 165 | +device = "mps" |
| 166 | +model = whisperx.load_model("large-v3", device, language="de") |
| 167 | +``` |
| 168 | + |
| 169 | +## Conclusion |
| 170 | + |
| 171 | +**There is NO native WhisperX CoreML model**, but: |
| 172 | +- ✅ CoreML Whisper models exist (including German-specific ones) |
| 173 | +- ✅ WhisperX can use MPS (Metal) backend for 10-20x speedup |
| 174 | +- ✅ MPS approach is simpler and nearly as fast as CoreML |
| 175 | +- ✅ Recommended: Use WhisperX with MPS for this project |
| 176 | + |
| 177 | +The MPS approach provides the best balance of: |
| 178 | +- Speed (10-20x faster than CPU) |
| 179 | +- Simplicity (single tool) |
| 180 | +- Functionality (word timestamps included) |
| 181 | +- Proven compatibility (already documented) |
| 182 | + |
| 183 | +--- |
| 184 | + |
| 185 | +**Created:** 2026-06-19 |
| 186 | +**Research:** HuggingFace model search for CoreML Whisper implementations |
| 187 | +**Context:** German podcast dataset processing for Moshi RAG training |
0 commit comments