GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-60729: Add support for floating point wave files. by lkoenig · Pull Request #102574 · python/cpython

Conversation

@lkoenig

@lkoenig lkoenig commented Mar 10, 2023 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

This adds support for floating point wav files and fix #60729.

  • Issue: wave file module does not support 32bit float format #60729

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

arhadthedev, cristoper, and TobiasUhmannVoss reacted with thumbs up emoji
All reactions
  • 👍 3 reactions
@bedevere-bot

bedevere-bot commented Mar 10, 2023

Copy link
Copy Markdown

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot mentioned this pull request Mar 10, 2023
wave file module does not support 32bit float format #60729
Closed
@bedevere-bot bedevere-bot added the awaiting review label Mar 10, 2023
@ghost

ghost commented Mar 10, 2023 •
edited by ghost
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.
CLA signed

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lkoenig

lkoenig commented Mar 10, 2023

Copy link
Copy Markdown
Contributor Author

I want to update the documentation also but want to get a sense if I am out of my mind first.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lkoenig
lkoenig force-pushed the dev/wav_float branch 3 times, most recently from f7bd78b to 4ee51f5 Compare March 14, 2023 12:30
@mbeijen

mbeijen commented Feb 18, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Hi @lkoenig ! I know it's been a long time since you submitted this PR. Right now it no longer applies because sunaudio and aifc have been removed from python stdlib.!

I've recently published newwave, a drop-in replacement for stdlib wave. I've added your patch to it, thanks!! But I also changed it a little bit; I renamed 'encoding' to 'format' which I think makes more sense in the case of wave files. What do you think?

Also, in IEEE wave files, a 'fact' chunk is required as per the spec. Audacity would load any wave files without a fact chunk but it will generate fact chunks in IEEE wave audio files when writing. So, this should be added to your PR. In my module I've added this for any non-PCM wave files, see https://codeberg.org/michielb/newwave/commit/b0429ba553ba039966c79a5e21ee027cbd3f5194

To cpython maintainers: I think in general this addition seems to make sense, and if @lkoenig might or might not be available I'd be willing to also help a little getting this into shape!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@encukou

encukou commented Feb 19, 2026

Copy link
Copy Markdown
Member

This looks like a reasonably simple to try. Personally, not knowing much about the wave format, I can't yet promise I'll merge it, but if you're willing to explain things we can get there.

As it's been a few years, it's probably best if you do the merge in your own branch and open a new PR. Ideally, preserve the original commit.

Also, in IEEE wave files, a 'fact' chunk is required as per the spec.

Could you link to the place where this is specified?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mbeijen

mbeijen commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

Sure, I'll create a PR with my proposal, including @lkoenig original commit. I did that also in my newwave module :-)

My main problem is actually that in my opinion support for writing WAVE_FORMAT EXTENSIBLE is more desirable than the IEEE format. Somehow Python 3.12 got support for reading the extensible format in #96777 but never got support for writing. I've also implemented that, in the newwave module, and would like to upstream it into cpython wave.py. And I'll open a bug for that as well. But because both formats need slight changes to the same code, it might make more sense to first add support for writing WAVE_FORMAT_EXTENSIBLE and only then adding support for the IEEE format?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@encukou

encukou commented Feb 19, 2026

Copy link
Copy Markdown
Member

I'd suggest doing the simpler change first :)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lkoenig

lkoenig commented Feb 19, 2026

Copy link
Copy Markdown
Contributor Author

Hi @mbeijen!
Nice to see this small piece getting used :) I even forgot I wrote this PR.

Feel free to reuse it. I skimmed the change I made some times ago and it still feel ok to me. I'll try to update the PR to the up to date code.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lkoenig
Add support for floating point wave files.
4022661
This adds support for floating point wav files and fix python#60729.
@lkoenig
lkoenig force-pushed the dev/wav_float branch from 4ee51f5 to 4022661 Compare February 19, 2026 14:16
@mbeijen mbeijen mentioned this pull request Mar 1, 2026
GH-60729: Add IEEE format wave audio support #145384
Merged
@mbeijen

mbeijen commented Mar 1, 2026

Copy link
Copy Markdown
Contributor

This looks like a reasonably simple to try. Personally, not knowing much about the wave format, I can't yet promise I'll merge it, but if you're willing to explain things we can get there.

As it's been a few years, it's probably best if you do the merge in your own branch and open a new PR. Ideally, preserve the original commit.

I've created #145384 now with the commit from @lkoenig and with my changes on top.

Also, in IEEE wave files, a 'fact' chunk is required as per the spec.

Could you link to the place where this is specified?

Sure, I linked this in the commit message!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@encukou

encukou commented Mar 3, 2026

Copy link
Copy Markdown
Member

Let's move to #145384, then! Thanks for the starting PR, @lkoenig!

mbeijen reacted with rocket emoji
All reactions
  • 🚀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@encukou encukou closed this Mar 3, 2026
@mbeijen mbeijen mentioned this pull request Mar 13, 2026
GH-60729: Add IEEE format wave audio support take two #145931
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

awaiting review

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

wave file module does not support 32bit float format

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@lkoenig @bedevere-bot @mbeijen @encukou
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.