iver56 / audiomentations

A Python library for audio data augmentation. Inspired by albumentations. Useful for machine learning.
https://iver56.github.io/audiomentations/
MIT License
1.76k stars 183 forks source link

Seed of random effect #288

Closed Karamouche closed 1 year ago

Karamouche commented 1 year ago

Hello, is there a way to setup a seed to freeze probability on transforms ? It could helps to reproduce certain experiment cases.

Thanks :)

iver56 commented 1 year ago

I guess you could do

np.random.seed(1337)
random.seed(1337)

See also the example on how to use transform.freeze_parameters(), which may or may not be relevant in your case https://iver56.github.io/audiomentations/guides/transform_parameters/