1#!/usr/bin/env python3
2"""Transcribe an audio file with MLX Whisper (large-v3-turbo) and print the text.
3
4Used by Clover Recorder's marker overlay for voice notes. Runs against the venv
5created by setup-dictation.sh (~/.clover-whisper/.venv).
6
7 python transcribe.py <audio-file>
8"""
9import sys
10
11import mlx_whisper
12
13if len(sys.argv) < 2:
14 sys.exit("usage: transcribe.py <audio-file>")
15
16result = mlx_whisper.transcribe(
17 sys.argv[1],
18 path_or_hf_repo="mlx-community/whisper-large-v3-turbo",
19)
20print(result["text"].strip())