This U-Net uses a spectrogram to filter out background music and augment the training process. A high-fidelity model would work in 1D, but this is computationally expensive and infeasible to train on my device.
The spectrogram involves taking a short-time Fourier transform (STFT), and the Unet will deduce both a filtered amplitude and phase for the output. This means the Unet will need to take in two spectrograms to achieve this goal. Not including a new predicted phase will result in a sort of metalic noise and loss of fidelity over large window sizes. The parameters for the STFT are found in the gnereate_data.py class and the Unet itself is found under unet.py
The data is generated by finding various songs and speech recordings and amalgamating them. The combined file is the input and the isolated speech will be the target output of the Unet. The respective programs for generating the data are labeled as main_almalgamate.
To train the Unet run main_spectrogram_train_complex.py. Most of the related parameters are set under genreate_data.py and a dataloader is used to parallelize this workload. To run and test the trained Unet use main_spectrogram_continuous_complex.py.