aarush67's picture
Update README.md
818e2a7 verified
---
license: mit
language:
- en
- af
- am
- ar
- as
- az
- ba
- be
- bg
- bn
- bo
- br
- bs
- ca
- cs
- cy
- da
- de
- el
- eu
- fa
- fi
- fo
- fr
- gl
- gu
- ha
- he
- hi
- hr
- ht
- hu
- hy
- id
- is
- it
- ja
- jv
- ka
- kk
- km
- kn
- ko
- la
- lb
- ln
- lo
- lt
- lv
- mg
- mk
- ml
- mn
- mr
- ms
- mt
- my
- ne
- nl
- nn
- 'no'
- oc
- pa
- pl
- pt
- ro
- ru
- sa
- sd
- si
- sk
- sl
- sn
- so
- sq
- sr
- su
- sv
- sw
- ta
- te
- tg
- th
- tk
- tl
- tr
- tt
- uk
- ur
- uz
- vi
- yi
- yo
- zh
tags:
- whisper
- core-ml
- apple
- Apple-Silicon
---
# Whisper.cpp Core ML Models for Apple Silicon
This repository provides **prebuilt Core ML models for Whisper.cpp**, optimized for **Apple Silicon (M1, M2, M3, M4, M5)** devices.
These models enable **hardware-accelerated speech-to-text** using Apple’s Neural Engine via Core ML.
The repository is designed for **easy plug-and-play usage** with Whisper.cpp using a **prebuilt CLI binary**.
---
## πŸ“¦ Repository Contents
Each model directory contains **everything required** to run Whisper.cpp with Core ML acceleration:
- **`ggml-*.bin`** – Whisper model weights used by `whisper.cpp`
- **`*-encoder.mlmodelc/`** – Compiled Core ML encoder bundle
⚠️ **Important:** The `.mlmodelc` directories must remain intact. Do **not** modify, rename, or move their contents.
---
## πŸ“ Folder Structure
```
.
β”œβ”€β”€ tiny/
β”œβ”€β”€ tiny.en/
β”œβ”€β”€ base/
β”œβ”€β”€ base.en/
β”œβ”€β”€ small/
β”œβ”€β”€ small.en/
β”œβ”€β”€ medium/
β”œβ”€β”€ medium.en/
β”œβ”€β”€ large-v1/
β”œβ”€β”€ large-v2/
└── large-v3/
```
Each folder corresponds to a Whisper model variant and contains the matching `.bin` and `.mlmodelc` files.
---
## πŸš€ Model Variants Overview
The table below summarizes the trade-offs between **speed**, **accuracy**, and **memory usage**.
| Folder | Model Size | Speed | Accuracy | Notes |
|--------------|-----------|--------------|------------------|-------|
| `tiny` | Very Small | ⚑ Fastest | ⭐ Lowest | Best for real-time, low-resource use |
| `tiny.en` | Very Small | ⚑ Fastest | ⭐ Lowest | English-only |
| `base` | Small | ⚑ Fast | ⭐⭐ Balanced | Good default choice |
| `base.en` | Small | ⚑ Fast | ⭐⭐ Balanced | English-only |
| `small` | Medium | ⚑ Medium | ⭐⭐⭐ Better | Improved transcription quality |
| `small.en` | Medium | ⚑ Medium | ⭐⭐⭐ Better | English-only |
| `medium` | Large | 🐒 Slower | ⭐⭐⭐⭐ High | High accuracy, higher memory usage |
| `medium.en` | Large | 🐒 Slower | ⭐⭐⭐⭐ High | English-only |
| `large-v1` | Very Large | 🐒 Slow | ⭐⭐⭐⭐⭐ Best | Maximum accuracy |
| `large-v2` | Very Large | 🐒 Slow | ⭐⭐⭐⭐⭐ Best | Improved multilingual performance |
| `large-v3` | Very Large | 🐒 Slow | ⭐⭐⭐⭐⭐ Best | Latest and most accurate |
---
## πŸ›  Usage Instructions
### 1. Download the Prebuilt `whisper-cli` Binary
Download the Core ML–enabled `whisper-cli` binary directly from GitHub Releases:
```
https://github.com/aarush67/whisper-cli-for-core-ml/releases/download/v1.0.0/whisper-cli
```
Recommended directory structure:
```
.
β”œβ”€β”€ bin/
β”‚ └── whisper-cli
β”œβ”€β”€ medium.en/
β”‚ β”œβ”€β”€ ggml-medium.en.bin
β”‚ └── medium.en-encoder.mlmodelc/
```
---
### 2. Make the Binary Executable
```bash
chmod +x bin/whisper-cli
```
---
### 3. Run Whisper with a Core ML Model
Place the `.bin` file and the matching `.mlmodelc` folder in the same directory.
#### Example (English-only transcription)
```bash
./bin/whisper-cli -m ggml-medium.en.bin -f sample.wav
```
Whisper.cpp will automatically detect and use the Core ML encoder when available.
---
## 🧠 Best Practices & Notes
- βœ… **Keep `.bin` and `.mlmodelc` files together** from the same model variant
- ❌ Do **not** rename, edit, or partially copy `.mlmodelc` directories
- 🧹 `.pt` cache files (if generated) are temporary and **safe to delete**
- πŸ’Ύ Larger models require significantly more RAM and disk space
- ⚑ Best performance is achieved on Apple Silicon devices with a Neural Engine
---
## πŸ“œ License
- **Repository structure & metadata:** MIT License
- **Model weights & Core ML artifacts:** Governed by the original
**Whisper.cpp / OpenAI Whisper licenses**
Please review upstream licenses before commercial or large-scale use.
---
## πŸ™ Credits
- **OpenAI Whisper** – Original speech recognition models
- **whisper.cpp** by Georgi Gerganov – High-performance C/C++ implementation
- **Apple Core ML** – Hardware acceleration on Apple Silicon
---
## ⭐ Support
If this repository is useful to you:
- ⭐ Star the repository
- πŸ”— Support the upstream Whisper.cpp project