Skip to content

Pin PyAV below 19 until faster-whisper supports it - #367

Merged
kaixxx merged 1 commit into
kaixxx:mainfrom
cristianchiriac:fix/pin-pyav-below-19
Oct 6, 2026
Merged

kaixxx merged 1 commit into
kaixxx:mainfrom
cristianchiriac:fix/pin-pyav-below-19

Conversation

@cristianchiriac

Copy link
Copy Markdown
Contributor

The pytest workflow has been failing on main since PyAV 19.0.0 was released on 2026-09-29 (e.g. https://github.com/kaixxx/noScribe/actions/runs/37302401929). Every transcription aborts with:

File ".../faster_whisper/audio.py", line 46, in decode_audio
File "av/container/core.py", line 479, in av.container.core.open
TypeError: open() got an unexpected keyword argument 'metadata_errors'

PyAV 19 removed the metadata_errors argument of av.open(). The latest faster-whisper release, 1.2.1, still passes metadata_errors="ignore". faster-whisper's master already passes it only for PyAV < 19, but that fix hasn't been released, and faster-whisper only requires av>=11. So a fresh install of the requirements currently picks PyAV 19 and breaks transcription for users as well, not only in CI.

This pins av<19 in all environments/requirements_*.txt, with a comment explaining why. requirements_win_cuda.txt had no explicit av line, so the pin is added there. The pin can be dropped once a faster-whisper release with the fix is out.

Testing

  • In a fresh Python 3.13 venv with faster-whisper==1.2.1, decode_audio() on a 1-second WAV:
    • with av==19.0.1 it raises the TypeError above;
    • with av<19 (18.1.0) it decodes 16000 samples.
  • uv pip compile environments/requirements_linux.txt now resolves av==18.1.0 alongside faster-whisper==1.2.1.
  • I didn't run the full test suite locally, because the torch/pyannote stack is too heavy for my machine. The workflow run on this PR should show the result.

PyAV 19.0.0 (2026-09-29) removed the metadata_errors argument of av.open().
faster-whisper 1.2.1, the latest release, still passes metadata_errors="ignore"
in decode_audio(), so every transcription fails with
"TypeError: open() got an unexpected keyword argument 'metadata_errors'"
and the pytest workflow has been failing since. faster-whisper's master branch
already only passes the argument for PyAV < 19, but that is not released yet.
@happyarts

Copy link
Copy Markdown
Contributor

Confirming from our side: the pytest runs of all our open branches fail with exactly this TypeError on av 19.0.1 + faster-whisper 1.2.1 (28 failures, all through decode_audio). noScribe's own PyAV code is fine with 19: tests/audio/test_convert.py passed in full in the same runs, so the pin is only needed for faster-whisper and can go once it releases the fix.

(Checked with help from Claude Code.)

@happyarts

Copy link
Copy Markdown
Contributor

A possible follow-up that would make the pin unnecessary regardless of when faster-whisper releases: noScribe only ever hands faster-whisper its own converted 16 kHz mono WAV, so it doesn't need decode_audio at all. It is called in three places: the language detection and model.transcribe(audio_path) in whisper_mp_worker.py (with a path, transcribe calls decode_audio itself), and the Silero VAD in main.py. Reading the WAV with soundfile.read(path, dtype="float32") and passing the array instead skips faster-whisper's PyAV path entirely. On a 16-bit WAV the result is bit-identical to decode_audio, and it's the same pattern load_waveform already uses for pyannote.

This PR is still the right quick fix to get CI green. If you think the follow-up is worthwhile, I'd be happy to open a small PR for it.

(Written with help from Claude Code.)

@kaixxx

kaixxx commented Oct 6, 2026

Copy link
Copy Markdown
Owner

@cristianchiriac Thank you, good catch. I haven't had the time to look into why the GitHub tests where failing, but my local ones were running fine.

@kaixxx
kaixxx merged commit f251cd3 into kaixxx:main Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants