Soundevent

Latest version: v2.3.0

Safety actively analyzes 701475 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 5

0.6.3

Release Notes

Made a small change to the audio loading function so that any out of bounds loading will be filled with zeros. This behavior is preferred to ensure that when loading an audio clip, the loaded audio length matches with the clip duration.

0.6.2

Release Notes

Changed the mode of spectrogram computation to "magnitude". The default mode of the `scipy.signal` is power spectral density, which is not expected by other functions that consume spectrograms.

0.6.1

Release Notes

Fixed invalid file error.

Description

Audio loading failed on some WAV files. In particular this occurred both in 24 bit PCM WAV files, but also regular 32 bit PCM WAV files with unexpected RIFF chunks.

Solution

As we wish to support the widest possible formats of WAV files, specially common PCM subformats, we decided it would be best to adopt soundfile for WAV reading.

However, soundfile also fails whenever an unexpected RIFF chunk is encountered. Soundfile has the ability to read RAW audio files, which contain the data chunk contents and nothing else. Thus if the contents of the data chunk could be isolated it would be possible to use soundfile to convert the audio into numpy arrays. Hence we created a file-like object that wraps a single chunk as if it were a whole file, and then provide it to soundfile for reading.

Changes

1. Added pysoundfile to the dependencies.
2. Created RawAudio class that encapsulates a single RIFF chunk into a file-like format.
3. Updated the loading audio function to use soundfile and the RawAudio objects.

0.6.0

Release Notes

In this new minor release we added the following functions to the `soundevent.audio` module:

1. `audio.resample` for audio resampling. It uses scipy.signal.resample to achieve this.
2. `audio.filter` for audio filtering. It is capable of doing low/high/bandpass filters with a butterworth filter.

0.5.4

Release Notes

This is a minor patch release. I found that the media extraction process could hang forever due to an infinite loop during chunk parsing. I added some rail guards to avoid this situation in this patch.

0.5.2

Release Notes

Here are the changes introduced in this release:

1. Created functions to compute geometric features of sound events. These features are computed based solely on the geometry of a sound event, not using information from the audio data or spectrogram.
2. Created a `soundevent.geometry.geometry_validate` function to create a Geometry object from a JSON string, a python dictionary or a python class with the correct attribute structure. This is handy in case you want to cast geometry data into a `soundevent.data.Geometry` object and perform validation.

Page 4 of 5

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.