pip install faster-whisper==0.10.0 builds PyAV from source and fails on Debian trixie / FFmpeg 7: "'struct AVFrame' has no member named 'channels'"; upgrade to faster-whisper 1.x
Fix: upgrade to faster-whisper 1.x (1.2.1 requires av>=11) and remove the build toolchain you added for PyAV. pip then installs a binary PyAV wheel with FFmpeg bundled (av-18.1.0 on Python 3.11 in a python:3.11-slim test), so you need no gcc, pkg-config or libav*-dev. faster-whisper 0.10.0 pins av==11.*, and PyAV 11.0.0 exists on PyPI only as an sdist (pip download --only-binary=:all: av==11.0.0 finds nothing; binary wheels start at 12.0.0). Every install therefore compiles PyAV, and it fails in three stages: 'pkg-config is required for building PyAV', then 'error: [Errno 2] No such file or directory: gcc' on slim images, and finally, against the FFmpeg 7.1 dev headers that Debian trixie ships (python:3.x-slim is trixie now), "src/av/frame.c: error: 'struct AVFrame' has no member named 'channels'", because FFmpeg 7 removed AVFrame.channels in favour of ch_layout. Adding build-essential and libavcodec-dev only gets you to that last error. Keep apt ffmpeg only if your own code shells out to the ffmpeg CLI (for example to decode browser webm to 16 kHz PCM). One code fix you may need after upgrading: WhisperModel has no model_path attribute in either version (it is only a local variable in __init__), so keep the model name in your own config if you log it.