facebookresearch / demucs

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

Normalized with a ref signal mean&std and restored using the same values, is there a energy gap between ref and separated signals? #610

Open yangxueruivs opened 3 months ago

yangxueruivs commented 3 months ago

❓ Questions

in https://github.com/facebookresearch/demucs/blob/v4.0.1/demucs/separate.py#L176: ref = wav.mean(0) wav -= ref.mean() wav /= ref.std() sources = apply_model(model, wav[None], device=args.device, shifts=args.shifts, split=args.split, overlap=args.overlap, progress=True, num_workers=args.jobs, segment=args.segment)[0] sources *= ref.std() sources += ref.mean()

source signal has an energy gap from the ref signal. Can we directly apply the mean and variance to the separated sources?