Skip to content

Conversation

@adinhodovic
Copy link

Adds support for bitrate as parameter to output arguments. It is useful converting files to MP3 format. Requires a new version of soundfile(0.11.0) that supports MP3 formats alongside upgraded libsndfile version to 1.1.0. This is for the test_bitrate_valid test.

@lostanlen
Copy link
Member

Hello @adinhodovic, the new feature looks great but from what I can see you are changing one of the dependencies from pysoundfile to soundfile. Can you remind me what happened there? Is this because of dependency resolution?

@adinhodovic
Copy link
Author

hey @lostanlen, I believe the dependency was renamed in the PyPi registry and the newer versions were only found under soundfile.

Breaking Changes
The soundfile module has evolved rapidly in the past. Most notably, we changed the import name from import pysoundfile to import soundfile in 0.7. In 0.6, we cleaned up many small inconsistencies, particularly in the the ordering and naming of function arguments and the removal of the indexing interface.

@danihodovic
Copy link

It would be nice to have this merged @lostanlen

sox/transform.py Outdated
raise ValueError('channels must be a positive number')

if not isinstance(bitrate, float) and bitrate is not None:
raise ValueError('bitrate must be an float or None')
Copy link
Member

Choose a reason for hiding this comment

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

grammar

must be a positive float ?

Copy link
Author

Choose a reason for hiding this comment

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

👍

@lostanlen
Copy link
Member

tests are failing on MP3 ?

Adds support for bitrate as parameter to output arguments. It is useful converting files to MP3 format. Requires a new version of soundfile(0.11.0) that supports MP3 formats alongside upgraded libsndfile version to 1.1.0. This is for the `test_bitrate_valid` test.
@adinhodovic adinhodovic force-pushed the compression-support branch from f82feb1 to e0721a9 Compare June 16, 2024 22:31
@adinhodovic
Copy link
Author

Can you re run the workflow, think the OS mp3 dependency was missing.

@grantgeorge
Copy link

👍 looking forward to this functionality being added

@lostanlen lostanlen added this to the 1.6 milestone Aug 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants