Loads parakeet-mlx in-process (no HTTP hop) and serves it over the Wyoming
protocol. On an M4 Mac mini this transcribes typical voice commands in ~110ms
versus ~1150ms for a whisper.cpp large-v3 setup, with identical accuracy on a
ten-command benchmark.
Two behaviours matter beyond speed: silence returns an empty string rather
than whisper's "Thank you." hallucination, and there is no decoder context
carried between requests.
Notable implementation details, all covered by mutation-checked regression
tests:
- MLX streams are thread-local, so the model is loaded and evaluated on a
single dedicated worker thread. Splitting those raises
"There is no Stream(cpu, 1) in current thread".
- parakeet_mlx.load_audio() shells out to ffmpeg, which is unnecessary here
since Wyoming delivers 16kHz mono PCM. The mel is built directly via
get_logmel(), whose input must be float32 -- it views the complex STFT
output as the input dtype, so anything narrower doubles the mel bin count.
- Wyoming's run loop has no except clause, so an exception escaping
handle_event closes the connection without sending a Transcript and Home
Assistant waits indefinitely. Failures are caught and returned as an empty
transcript instead.
Defaults to parakeet-tdt-0.6b-v2 rather than the newer multilingual v3
because v2 emits digits ("21 degrees") where v3 spells numbers out, and
Home Assistant's local intent matching expects digits.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
25 lines
700 B
Bash
Executable File
25 lines
700 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Remove the wyoming-parakeet LaunchDaemon. Leaves the checkout and the
|
|
# downloaded model in ~/.cache/huggingface alone.
|
|
set -euo pipefail
|
|
|
|
LABEL="local.wyoming-parakeet"
|
|
PLIST="/Library/LaunchDaemons/$LABEL.plist"
|
|
|
|
echo "==> Stopping $LABEL"
|
|
sudo launchctl bootout "system/$LABEL" 2>/dev/null || echo " (not running)"
|
|
|
|
if [[ -f "$PLIST" ]]; then
|
|
echo "==> Removing $PLIST"
|
|
sudo rm -f "$PLIST"
|
|
fi
|
|
|
|
cat <<MSG
|
|
|
|
Done. Not removed:
|
|
- this checkout, including .venv
|
|
- the model in ~/.cache/huggingface (delete with:
|
|
rm -rf ~/.cache/huggingface/hub/models--mlx-community--parakeet-tdt-0.6b-v2)
|
|
- the Wyoming integration in Home Assistant (remove it in the UI)
|
|
MSG
|