- Apple Silicon perf/efficiency:
parakeet-mlxruns on MLX, which is designed for M‑series chips and should outperform PyTorch/MPS for this model class on macOS [parakeet-mlx]. - Community interest already captured in the project issue [Issue #1].
-
Dependencies (optional install)
- Add a separate optional requirements file:
requirements-mlx.txtwith:mlx(Apple MLX)parakeet-mlx- Reuse existing
numpy/soundfilealready inrequirements.txt
- Document install:
uv pip install -r requirements-mlx.txt[[memory:3574993]]. - Gate feature on macOS arm64 and successful import.
- Add a separate optional requirements file:
-
New model class
- Create
models/parakeet_mlx.pywithParakeetMLXModel(BaseSTTModel). load_model():from parakeet_mlx import from_pretrained- Default HF ID:
"mlx-community/parakeet-tdt-0.6b-v2"(as shown in the repo docs). - No torch device handling; MLX manages its own device.
transcribe_batch(audio_paths: List[str]) -> List[str]:- For each path, use
parakeet_mlx.audio.load_audio(path, model.preprocessor_config.sample_rate) - Call
model.generate(...)or the high-level transcribe util and extract clean text. - Return list of strings, mirroring current
BaseSTTModelcontract.
- For each path, use
- Create
-
Factory integration
- Extend
ModelFactory._DEFAULT_ALIASES:- Add
"parakeet-mlx": "mlx-community/parakeet-tdt-0.6b-v2".
- Add
- In
ModelFactory.get_model(...):- Route to
ParakeetMLXModelwhen:- alias is
"parakeet-mlx", or - model string starts with
"mlx-community/"or"mlx/".
- alias is
- If import fails, raise
ImportErrorwith a clear message to installrequirements-mlx.txt.
- Route to
- Extend
-
CLI and UX
--list-modelsshould includeparakeet-mlxwith a note: “Apple Silicon/MLX (optional dependency)”.- Keep default as current NeMo
"parakeet"; users can opt in to"parakeet-mlx". - On non‑macOS or non‑arm64, still allow selection but warn and fall back if MLX stack is missing.
-
Transcription worker compatibility (Phase 1)
- No worker changes required: it writes temp WAVs and calls
transcribe_batch, which the MLX model will support. - This minimizes risk and keeps latency characteristics unchanged initially.
- No worker changes required: it writes temp WAVs and calls
-
Streaming (Phase 2, optional)
- Add optional streaming path leveraging
model.transcribe_stream(...)fromparakeet-mlxfor lower latency. - Approach:
- Add optional streaming interface to
BaseSTTModel(e.g.,supports_streaming,start_stream,add_audio,get_stream_text,end_stream). - In
transcription.py, if the model supports streaming, bypass temp-file path and feed chunks directly. - Keep a feature flag to toggle this while stabilizing.
- Add optional streaming interface to
- Add optional streaming path leveraging
-
Tests
- Add a macOS/arm64‑only test (skip otherwise) that:
- Loads
ParakeetMLXModel(or--model parakeet-mlx) and transcribestest.wav. - Asserts non-empty/transcription shape and no exceptions.
- Loads
- Keep existing tests unchanged.
- Add a macOS/arm64‑only test (skip otherwise) that:
-
Docs
- README:
- Add a “Apple Silicon (MLX) optional acceleration” section.
- Show install via
uv pip install -r requirements-mlx.txt[[memory:3574993]]. - Show usage:
ctrlspeak --model parakeet-mlx. - Briefly note the benefits and platform limits.
- README:
-
Homebrew (optional follow-up)
- If you want MLX out-of-the-box for Brew users, add an optional subformula or caveat in
ctrlspeak.rbabout installing MLX extras. Otherwise, keep it opt‑in via manual install.
- If you want MLX out-of-the-box for Brew users, add an optional subformula or caveat in
-
Compatibility notes
- Verify MLX supports Python 3.13.3 on your machine. If not, pin to a supported version in
requirements-mlx.txtor note the constraint in README. - Keep NeMo/PyTorch path as the cross‑platform default.
- Verify MLX supports Python 3.13.3 on your machine. If not, pin to a supported version in
- Add
models/parakeet_mlx.py - Edit
models/factory.py(aliases + routing) - Optionally add
requirements-mlx.txt - Update
ctrlspeak.pylist-models output and README
If you want, I can implement Phase 1 (non‑streaming MLX model) now, then we can iterate on the streaming worker after validation.
- Added a concrete, low-risk plan to add
parakeet-mlxalongside existing NeMo models. - Kept cross-platform default unchanged; MLX is optional and gated.
- Outlined follow-ups for streaming, tests, docs, and optional Homebrew note.