Transcribe
Local speech-to-text with Whisper. On Apple Silicon, mlx-whisper runs on the GPU and is fast (a 15-20 minute file takes a couple of minutes). Elsewhere, openai-whisper does the same job more slowly. Both run through uvx, so nothing is installed permanently.
Steps
-
Locate the input. Use the path the user gave, or the path printed by the youtube-search download step (
--print after_move:filepath). Done whenlsconfirms the file exists. -
Convert only if needed. Both engines read m4a, mp3, wav, flac, ogg, webm and mp4 directly via ffmpeg. Convert first with the ffmpeg-cli skill (from this marketplace's
ffmpegplugin) when the file is an unusual format (.amr,.wma,.caf), or an.opusvoice note, which decodes more reliably as m4a:ffmpeg -i "input.opus" -c:a aac -b:a 128k "input.m4a" -
Pick the language. Pass
--language <code>(en,es,fr, ...) whenever the user states it or the context makes it obvious - auto-detection costs time and can misidentify short clips. Omit the flag only when the language is genuinely unknown. -
Pick the engine with
uname -sm:Darwin arm64runs mlx-whisper; anything else runs openai-whisper. -
Run it (allow up to 600 s; the first run also downloads the model, about 1.5 GB):
Apple Silicon - mlx-whisper
OUTPUT_DIR=$(mktemp -d) uvx --from mlx-whisper mlx_whisper "/path/to/audio.m4a" \ --model mlx-community/whisper-large-v3-turbo \ --language en --output-format txt -o "$OUTPUT_DIR"Other platforms - openai-whisper (needs
ffmpegon PATH; uses theturbomodel by default; CPU-only is slow on long files)OUTPUT_DIR=$(mktemp -d) uvx --from openai-whisper whisper "/path/to/audio.m4a" \ --model turbo --language en --output_format txt -o "$OUTPUT_DIR"Note the flag spelling differs:
--output-formatfor mlx-whisper,--output_formatfor openai-whisper. Usesrtorvttinstead oftxtwhen the user wants subtitles, orallfor every format.Done when
$OUTPUT_DIR/<input-basename>.txtexists and is non-empty. -
Deliver the transcript. Print the full verbatim text in the conversation - summarise only when asked. When it runs past about 2000 words, offer to save it as a
.txtnext to the source file.