Whisper Low Memory Module Wired Up | Generated by AI

Home 2026.08

All done. ww whisper <file> --low-memory is wired up. Summary of changes:

Changes

1. New module — ww/audio/whisper_low_mem.py Adapted your transcribe.py memory-safe loader (CPU checkpoint → GPU fp16 only, ~3.2 GB for large-v3) into a proper main() module. whisper is imported lazily with a friendly error if openai-whisper isn’t installed. CLI:

ww whisper file.mp4 --low-memory [--model large-v3] [--language zh] [--task transcribe|translate] [--device cuda]

Writes <stem>.txt/.srt/.json/.vtt/.tsv next to the audio, same as your script.

2. ww/main.py

3. ~/.zsh/completions/_ww The whisper file-completion case now also offers --low-memory, --model, --language, --task, --device flags. (Reload with autoload -Uz compinit && compinit.)

4. pyproject.toml Added openai-whisper>=20240930uv sync already run, installed openai-whisper==20250625 cleanly (torch was already present via whisperx).

Verified

Note: the model must be cached at ~/.cache/whisper/large-v3.pt (download once with whisper large-v3); the loader will tell you if it’s missing. The full transcription path needs your CUDA GPU, so test it on the workstation.


Generated by AI. Curating and sharing still takes effort. If you find it useful, feel free to donate. WeChat: @lzwjavaWeChat QR · X: @lzwjava · Say hi 👋

Back Donate