MLX Whisper
Local speech-to-text using Apple MLX, optimized for Apple Silicon Macs.
Quick Start
CODEBLOCK0
Common Usage
CODEBLOCK1
Models (download on first use)
| Model | Size | Speed | Quality |
|---|
| mlx-community/whisper-tiny | ~75MB | Fastest | Basic |
| mlx-community/whisper-base |
~140MB | Fast | Good |
| mlx-community/whisper-small | ~470MB | Medium | Better |
| mlx-community/whisper-medium | ~1.5GB | Slower | Great |
| mlx-community/whisper-large-v3 | ~3GB | Slowest | Best |
| mlx-community/whisper-large-v3-turbo | ~1.6GB | Fast | Excellent (Recommended) |
Notes
- - Requires Apple Silicon Mac (M1/M2/M3/M4)
- Models cache to INLINECODE0
- Default model is
mlx-community/whisper-tiny; use --model mlx-community/whisper-large-v3-turbo for best results
MLX Whisper
使用Apple MLX的本地语音转文字,针对Apple Silicon Mac进行了优化。
快速开始
bash
mlx_whisper /path/to/audio.mp3 --model mlx-community/whisper-large-v3-turbo
常见用法
bash
转录为文本文件
mlx_whisper audio.m4a -f txt -o ./output
指定语言进行转录
mlx_whisper audio.mp3 --language en --model mlx-community/whisper-large-v3-turbo
生成字幕(SRT格式)
mlx_whisper video.mp4 -f srt -o ./subs
翻译为英语
mlx_whisper foreign.mp3 --task translate
模型(首次使用自动下载)
| 模型 | 大小 | 速度 | 质量 |
|---|
| mlx-community/whisper-tiny | ~75MB | 最快 | 基础 |
| mlx-community/whisper-base |
~140MB | 快 | 良好 |
| mlx-community/whisper-small | ~470MB | 中等 | 较好 |
| mlx-community/whisper-medium | ~1.5GB | 较慢 | 优秀 |
| mlx-community/whisper-large-v3 | ~3GB | 最慢 | 最佳 |
| mlx-community/whisper-large-v3-turbo | ~1.6GB | 快 | 极佳(推荐) |
注意事项
- - 需要Apple Silicon Mac(M1/M2/M3/M4)
- 模型缓存至 ~/.cache/huggingface/
- 默认模型为 mlx-community/whisper-tiny;使用 --model mlx-community/whisper-large-v3-turbo 可获得最佳效果