cutawan icon indicating copy to clipboard operation
cutawan copied to clipboard

Local Whisper transcription crashes: PyAV 19 removed `metadata_errors` (`pip install faster-whisper` is unpinned)

Open RishavRajSingh44 opened this issue 4 weeks ago • 0 comments

What happens

On a fresh install, after Settings → ChatGPT subscription via Codex → Install local Whisper, every Get clips run fails immediately at the transcription step:

Local provider exited (1). Check setup, sign-in and subscription limits.
  File "...\Cutawan\resources\local-whisper\transcribe.py", line 92, in <module>
    print(json.dumps(transcribe_mlx(folder) if folder else transcribe_cpu()))
  File "...\Cutawan\resources\local-whisper\transcribe.py", line 76, in transcribe_cpu
    segments, info = model.transcribe(
  File "...\local-whisper\venv\Lib\site-packages\faster_whisper\transcribe.py", line 876, in transcribe
    audio = decode_audio(audio, sampling_rate=sampling_rate)
  File "...\local-whisper\venv\Lib\site-packages\faster_whisper\audio.py", line 46, in decode_audio
    with av.open(input_file, mode="r", metadata_errors="ignore") as container:
  File "av/container/core.py", line 479, in av.container.core.open
TypeError: open() got an unexpected keyword argument 'metadata_errors'

"Save and check setup (no AI request)" reports the setup as ready, so the crash only shows up on the first real run.

Cause

src/main/localWhisper.ts:98 installs faster-whisper without pinning any versions. faster-whisper 1.2.1 declares only av>=11, so pip installs PyAV 19.0.2, which no longer accepts the metadata_errors argument that faster-whisper still passes.

Installed versions in the private venv:

Package Version
faster-whisper 1.2.1
av 19.0.2 (fails)
ctranslate2 4.8.5
Python 3.12.10

Workaround (confirmed)

Downgrading PyAV inside Cutawan's private venv fixes it:

%APPDATA%\cutawan\local-whisper\venv\Scripts\python.exe -m pip install "av==18.1.0"

After that, the same video transcribes, finds 5 clips, and exports correctly. Clicking "Reinstall or change model" brings the bug back, because it reinstalls the newest PyAV.

Suggested fix

Pin a known-good PyAV version in the install command, e.g.:

['-m', 'pip', 'install', '--disable-pip-version-check', 'faster-whisper', 'av<19', 'huggingface-hub']

Or, better for reproducible installs, pin exact versions (faster-whisper==1.2.1, av==18.1.0) and bump them deliberately. The setup check could also run a tiny av.open(..., metadata_errors="ignore") smoke test so a broken environment shows up before the first job.

Environment

  • Cutawan v0.14.0 (Cutawan-Setup-0.14.0.exe from GitHub Releases, checksum matches latest.yml)
  • Windows 11 Home 10.0.26200, Intel Iris Xe (CPU transcription, int8)
  • AI connection: ChatGPT subscription via Codex (beta), local Whisper "Small" model
  • Python used for the venv: 3.12.10

Steps to reproduce

  1. Fresh install of v0.14.0 on Windows.
  2. Settings → AI connection → ChatGPT subscription via Codex → Install local Whisper (Small).
  3. Import any MP4 with speech → Get clips.
  4. It fails at "Transcribing with Whisper…" with the traceback above.

RishavRajSingh44 avatar Nov 05 '26 18:11 RishavRajSingh44