[Bugfix][Audio] Restore soundfile-first automatic decoding (#55642)
Signed-off-by: Andreas Karatzas <Andreas.Karatzas@amd.com>
This commit is contained in:
@@ -1210,7 +1210,7 @@ vLLM decodes audio bytes into waveforms using a selectable decoding backend:
|
||||
|
||||
| Backend | Description |
|
||||
| --- | --- |
|
||||
| `auto` (default) | torchcodec, falling back to soundfile, then PyAV |
|
||||
| `auto` (default) | soundfile, falling back to torchcodec, then PyAV |
|
||||
| `soundfile` | libsndfile only, no fallback |
|
||||
| `pyav` | PyAV (FFmpeg) only, no fallback |
|
||||
| `torchcodec` | TorchCodec (PyTorch-native) only, no fallback |
|
||||
@@ -1226,15 +1226,17 @@ vllm serve mistralai/Voxtral-Mini-3B-2507 \
|
||||
`pyav` drives FFmpeg through a per-frame Python generator, so under
|
||||
concurrency the Python/C crossings contend on the GIL. `torchcodec`
|
||||
decodes each stream in a single call that releases the GIL for its whole
|
||||
duration, which is why `auto` prefers it when many requests decode audio
|
||||
concurrently, such as when audio tracks are extracted from video.
|
||||
duration. Select it explicitly for concurrent decoding workloads.
|
||||
`auto` prefers soundfile for supported formats to preserve their existing
|
||||
decoding behavior, including encoder padding. Audio extracted from formats
|
||||
that soundfile cannot read, such as video containers, can use torchcodec
|
||||
through the fallback chain.
|
||||
|
||||
!!! note
|
||||
`torchcodec` ships as a requirement on CUDA, CPU and XPU builds. On other
|
||||
platforms (e.g. ROCm, TPU) `auto` falls back to the soundfile → PyAV
|
||||
chain unless you install it manually. torchcodec also links against a
|
||||
system FFmpeg installation; if FFmpeg is missing, `auto` falls back the
|
||||
same way.
|
||||
platforms (e.g. ROCm, TPU), install it manually to enable that backend.
|
||||
torchcodec also links against a system FFmpeg installation. If the package
|
||||
or FFmpeg is unavailable, `auto` uses the soundfile → PyAV chain.
|
||||
|
||||
### Embedding Inputs
|
||||
|
||||
|
||||
Reference in New Issue
Block a user