torch-audiomentations icon indicating copy to clipboard operation
torch-audiomentations copied to clipboard

Reverb Augmentation

Open mogwai opened this issue 3 years ago • 6 comments

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?

mogwai avatar Nov 11 '20 17:11 mogwai

I guess we'll rely on pre-computed RIR instead of generating our own. You can have a look here for our current approach.

mpariente avatar Nov 11 '20 18:11 mpariente

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.

iver56 avatar Nov 11 '20 18:11 iver56

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.

popcornell avatar Nov 11 '20 18:11 popcornell

I forgot about this one which would get close to this feature: https://github.com/facebookresearch/denoiser/blob/master/denoiser/augment.py#L29

mpariente avatar Nov 11 '20 18:11 mpariente

Maybe this is relevant? https://github.com/sweetcocoa/ddsp-pytorch/blob/master/components/reverb.py#L14

iver56 avatar Dec 11 '20 09:12 iver56

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?

mogwai avatar Mar 14 '21 10:03 mogwai