Skip to content

Add support for reading WAV files that contain MP3 data.#447

Merged
psobot merged 5 commits intomasterfrom
psobot/compressed-wav
Jan 12, 2026
Merged

Add support for reading WAV files that contain MP3 data.#447
psobot merged 5 commits intomasterfrom
psobot/compressed-wav

Conversation

@psobot
Copy link
Copy Markdown
Member

@psobot psobot commented Jan 12, 2026

We have the ability to decode MP3 files and the ability to decode WAV files, but not the ability to parse WAV files that contain MP3 data. This is supported by the WAV spec but is very rare.

This PR adds a wrapper PatchedWavAudioFormat that:

  • Checks the headers of the WAV file to detect what compression is used therein
  • If MP3 is detected, delegate to our existing MP3 parser
  • If another unsupported format is detected, raise a descriptive error message

Includes fixture tests.

@psobot psobot added the enhancement New feature or request label Jan 12, 2026
Copy link
Copy Markdown
Collaborator

@hyperc54 hyperc54 left a comment

Choose a reason for hiding this comment

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

neat!
the test error is a bit mysterious

@psobot psobot force-pushed the psobot/compressed-wav branch from b5933b2 to 8ae876b Compare January 12, 2026 18:34
@psobot psobot merged commit 4e8e072 into master Jan 12, 2026
53 of 74 checks passed
@psobot psobot deleted the psobot/compressed-wav branch January 12, 2026 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants