torch-audiomentations
torch-audiomentations copied to clipboard
Reverb Augmentation
Currently supported in torchaudio using sox.
import torch
import torchaudio
from pyannote.audio.utils.preview import listen
from IPython.display import Audio
x = torchaudio.sox_effects.effect_names()
effects = [["reverb"]]
wave,sr = torchaudio.load("./tests/data/tst00.wav")
display(Audio(wave, rate=sr))
wave, sr = torchaudio.sox_effects.apply_effects_tensor(wave, sr, effects)
print(sr, wave.shape)
display(Audio(wave[0][None], rate=sr))
I found an article where someone implements Schroeder's Reverberator algorthim and comes with code
Is this something that you are planning to implement/ in the process of doing so?
I guess we'll rely on pre-computed RIR instead of generating our own. You can have a look here for our current approach.
A reverb augmentation is a welcome addition (I'd be happy to review and accept a PR), although we already have a transform for convolving with room impulse response wavs.
It could be interesting to try, even if simulated RIRs are usually much more realistic than DSP-based artificial reverbs (at least open-source ones, commercial ones are another story). I think it has never been explored and can actually be much faster than convolving with long RIRs.
I forgot about this one which would get close to this feature: https://github.com/facebookresearch/denoiser/blob/master/denoiser/augment.py#L29
Maybe this is relevant? https://github.com/sweetcocoa/ddsp-pytorch/blob/master/components/reverb.py#L14
I forgot about this one which would get close to this feature: https://github.com/facebookresearch/denoiser/blob/master/denoiser/augment.py#L29
Why do you say close, what is missing from that implementation?