senstella/parakeet-mlx
An implementation of the Nvidia's Parakeet models for Apple Silicon using MLX.
Parakeet MLX – Speech‑to‑Text on Apple Silicon
What it is – A Python package that runs Nvidia’s Parakeet automatic‑speech‑recognition (ASR) models on Apple‑silicon Macs using the MLX inference framework. It provides a command‑line tool and a Python API for turning audio files (or live audio streams) into transcriptions with timestamps.
Key features (from the README)
| Feature | Details |
|---|---|
| Model support | Loads Parakeet variants (TDT, RNNT, CTC, TDTCTC) from Hugging‑Face (mlx-community/parakeet‑tdt‑0.6b‑v3 etc.). |
| Apple‑silicon acceleration | Uses the MLX library, which is optimized for the M‑series GPU/CPU. |
| CLI | parakeet-mlx <audio_files> [OPTIONS] – batch transcription, selectable output formats (txt, srt, vtt, json, or all), word‑level timestamps, chunking for long files, beam‑search decoding, precision control (bf16 / fp32), and local‑attention mode for memory‑efficient long audio. |
| Python API | from_pretrained loads a model; model.transcribe(path, …) returns an AlignedResult with full text and per‑sentence/ token timestamps. |
| Decoding options | Greedy (default) or beam search (beam size, length penalty, patience, duration reward). |
| Chunking & streaming | Split long audio into overlapping chunks; transcribe_stream enables real‑time transcription with configurable attention context and depth. |
| Local attention | Switch to a sliding‑window attention (rel_pos_local_attn) to reduce memory for very long inputs. |
| Output templating | Custom filename patterns using {filename}, {parent}, {index}, {date}. |
| Installation | Via uv (recommended) or pip; requires system ffmpeg. |
How to use it
CLI quick start
# basic transcription
parakeet-mlx audio.mp3
# VTT subtitles with word‑level timestamps
parakeet-mlx *.mp3 --output-format vtt --highlight-words
# generate every supported format
parakeet-mlx audio.mp3 --output-format all
Python example
from parakeet_mlx import from_pretrained, DecodingConfig, Beam
model = from_pretrained("mlx-community/parakeet-tdt-0.6b-v3")
# simple greedy decode
res = model.transcribe("audio.wav")
print(res.text)
# beam search with custom parameters
cfg = DecodingConfig(decoding=Beam(beam_size=5, length_penalty=0.013,
patience=3.5, duration_reward=0.67))
res = model.transcribe("audio.wav", decoding_config=cfg)
print(res.sentences)
Who might find it useful?
- Developers building voice‑enabled macOS apps who need on‑device transcription without sending data to the cloud.
- Researchers prototyping ASR pipelines on Apple hardware, leveraging Nvidia‑trained Parakeet models.
- Content creators who want fast, local subtitle generation (SRT/VTT) for podcasts or videos.
Limitations & TODO (as listed)
- No built‑in word‑accuracy enhancement yet.
- Chunking with continuous context is only partially supported; streaming aims to fill that gap.
License
Apache 2.0 – free for commercial and research use.
All information above is taken directly from the repository’s README.
Related
- Project
- Project
- Project
- Project
- Project