Skip to content

[Bugfix][Audio] Restore soundfile-first automatic decoding - #55642

Merged
Isotr0py merged 2 commits into
mainfrom
akaratza_speech_decoder
Sep 7, 2026
Merged

Isotr0py merged 2 commits into
mainfrom
akaratza_speech_decoder

Conversation

@AndreasKaratzas

@AndreasKaratzas AndreasKaratzas commented Sep 7, 2026

Copy link
Copy Markdown
Member

Speech jobs passed in AMD build 12635 before PR #51826 made TorchCodec the preferred automatic audio decoder. A local GPU git bisect identified its merge commit, 6a039f465e37, as the cause of the test_long_audio_request failures in build 12653 on MI300 and MI355. With TorchCodec 0.10 and FFmpeg 4.4.2, the Mary Vorbis fixture gains 192 padding samples at 16 kHz, changing repeated-audio boundaries and reducing recognized phrase repetitions from ten to seven.

  • Restore automatic decoding order to soundfile → TorchCodec → PyAV, preserving the previous waveform length for soundfile-supported formats.
  • Document the restored order and explicit TorchCodec selection for concurrent decoding; retain TorchCodec fallback for unsupported formats such as video containers.

Prepared with AI assistance. The recorded upstream duplicate audit found no matching open fix for this decoder-priority regression.

Assisted-by: OpenAI Codex
Signed-off-by: Andreas Karatzas <Andreas.Karatzas@amd.com>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@mergify

mergify Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Documentation preview: https://vllm--55642.org.readthedocs.build/en/55642/

@mergify mergify Bot added documentation Improvements or additions to documentation multi-modality Related to multi-modality (#4194) bug Something isn't working labels Sep 7, 2026
@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: ef360081-c72c-4af3-a842-90f31931e645

📥 Commits

Reviewing files that changed from the base of the PR and between f43ef15 and 7b5f6e5.

📒 Files selected for processing (3)
  • docs/features/multimodal_inputs.md
  • tests/multimodal/media/test_audio.py
  • vllm/multimodal/media/audio.py

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Summary

Summary by CodeRabbit

  • Bug Fixes

    • Improved automatic audio decoding to preserve waveform lengths for supported formats, including Vorbis audio.
    • Added fallback handling for formats unsupported by the preferred decoder, including video containers.
    • Improved compatibility on platforms where optional audio decoding components are unavailable.
  • Documentation

    • Updated audio decoding documentation to clarify the automatic backend preference and fallback behavior.

Walkthrough

The audio auto backend now prefers soundfile, then uses torchcodec and PyAV as fallbacks. A Vorbis length regression test and updated multimodal audio documentation cover the new order.

Changes

Audio backend order

Layer / File(s) Summary
Automatic backend selection
vllm/multimodal/media/audio.py
load_audio now tries soundfile, then torchcodec, then PyAV. Import and format-detection failures continue through the fallback chain.
Validation and documentation
tests/multimodal/media/test_audio.py, docs/features/multimodal_inputs.md
The test checks that default Vorbis decoding matches soundfile output. The documentation describes the new order and platform behavior.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 6eb61

Automatic audio decoding now preserves soundfile-supported waveform lengths while retaining fallbacks for unsupported formats. The implementation, regression coverage, and documentation are aligned, with no remaining merge-readiness risk identified.

Suggested reviewers: jaredforreal, jperezdealgaba

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files. (1 skipped: 1 …
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely identifies the main change: restoring soundfile-first automatic audio decoding.
Description check ✅ Passed The description directly explains the decoder regression, the affected audio behavior, the fix, documentation updates, and validation results.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@AndreasKaratzas

Copy link
Copy Markdown
Member Author

/ci run

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

✅ Triggered Buildkite CI #87481 for commit 6eb61b478f14.

@Isotr0py
Isotr0py enabled auto-merge (squash) September 7, 2026 04:21
@github-actions github-actions Bot added the ready ONLY add when PR is ready to merge/full CI is needed label Sep 7, 2026
@Isotr0py
Isotr0py merged commit f7f060d into main Sep 7, 2026
90 checks passed
@Isotr0py
Isotr0py deleted the akaratza_speech_decoder branch September 7, 2026 06:21
ItsRoy69 pushed a commit to ItsRoy69/vllm that referenced this pull request Sep 10, 2026
…ect#55642)

Signed-off-by: Andreas Karatzas <Andreas.Karatzas@amd.com>
Signed-off-by: Jyotirmoy Roy <jyotirmoyroy649@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation multi-modality Related to multi-modality (#4194) ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants