2025-03-28 12:14:26 +01:00
2025-03-28 12:10:48 +01:00
2025-03-28 12:08:48 +01:00
2025-03-28 12:08:48 +01:00
2025-03-28 12:10:48 +01:00
2025-03-28 12:10:48 +01:00
2025-03-28 12:14:26 +01:00

scaled_soundfile

A thin wrapper around the soundfile module to allow saving files of any scales.

The write function rescales the input to normalize it and maximize the number of bits it is saved on. The RMS of the original sound is saved in the 'comment' metadata field as part of a JSON object. The files are saved as 'PCM_24'.

The read function loads the normalized data, and rescales it so that the RMS matches the original by reading the 'comment' metadata field if it exists.

In the current version of soundfile (and libsndfile) this only works with WAV files.

Installation

pip install git+https://git.web.rug.nl/dBSPL/scaled_soundfile.git
Description
A thin wrapper around the soundfile module to allow saving files of any scales.
Readme LGPL-3.0 46 KiB
Languages
Python 100%