abreuwallace / Stochastic-Restoration-GAN

Stochastic Restoration of Heavily Compressed Musical Audio using Generative Adversarial Networks in Pytorch
MIT License
6 stars 0 forks source link

How to train it on my music collection? #1

Open teodly opened 8 months ago

teodly commented 8 months ago

Hello,

Thanks for taking this up, I was thinking of it since I've heard of AI image restoration and wanted to do something similar for audio, but never had enough time to code it from scratch.

I'd like to try to train it on my lossless music collection.

I haven't found any transcoding in your code, so I assume that lossy encoded files should be pregenerated. How do you differentiate between lossless and lossy (degraded) tracks in the input folder? First half of tracks is treated differently and I don't understand why. https://github.com/abreuwallace/Stochastic-Restoration-GAN/blob/6e3334cb55d9468275a632ddfdce541c28c06eec/src/data/dataset.py#L89-L94

abreuwallace commented 8 months ago

Hi, thanks for your interest!

I should mention that even though the training runs, I didn't tweak the parameters so that the training becomes stable. If you or anyone wants to fix that or provide any mod for the code, feel free to issue a PR!

As for your question, if I recall correctly, I loaded the files in such a way that I had something like

loaded_files = [wav_1, wav_2, wav_3, mp3_1, mp3_2, mp3_3]

so the first half is for target chunks and the other half is for degraded chunks.