facebookresearch / demucs

Code for the paper Hybrid Spectrogram and Waveform Source Separation
MIT License
8.38k stars 1.07k forks source link

Why padding is applied before passing into STFT #601

Open SI-Abid opened 6 months ago

SI-Abid commented 6 months ago

Why in this method, https://github.com/facebookresearch/demucs/blob/e976d93ecc3865e5757426930257e200846a520a/demucs/htdemucs.py#L420 a specific amount of padding applied on the signal waveform? The padding used on both sides is not equal.

For the following params, signal_length = 160000 n_fft = 4096 hop_len = 1024

the padding is (1536, 2304)

I found no proper documentation on this anywhere in the code or paper.