Annmixiu / MTANet

INTERSPEECH2023: Multi-band Time-frequency Attention Network for Singing Melody Extraction from Polyphonic Music
27 stars 3 forks source link

After downloading the data, use the txt files in the data folder, and process the CFP feature by feature_extraction.py. #4

Open Viki520 opened 2 months ago

Viki520 commented 2 months ago

CFP process in data/wav/tammy_1_07.wav ... (It may take some times) Traceback (most recent call last): File "featureextraction.py", line 269, in W, , _ = cfp_process(wavpath, sr=8000) File "feature_extraction.py", line 216, in cfp_process y, sr = load_audio(fpath, sr=sr) File "feature_extraction.py", line 159, in load_audio x, fs = sf.read(filepath) File "/home/zhangjunwei/miniconda3/envs/TONet/lib/python3.8/site-packages/soundfile.py", line 285, in read with SoundFile(file, 'r', samplerate, channels, File "/home/zhangjunwei/miniconda3/envs/TONet/lib/python3.8/site-packages/soundfile.py", line 658, in init self._file = self._open(file, mode_int, closefd) File "/home/zhangjunwei/miniconda3/envs/TONet/lib/python3.8/site-packages/soundfile.py", line 1216, in _open raise LibsndfileError(err, prefix="Error opening {0!r}: ".format(self.name)) soundfile.LibsndfileError: Error opening 'data/wav/tammy_1_07.wav': System error.

Hello, I encountered the above error when dealing with the CFP function in the first step.Is this a data error or a problem with my system? Can someone help me?Can briefly write down the specific steps?Thank you

Annmixiu commented 2 months ago

Hi, I am very happy that you pay attention to my work. According to the error statement you provided, I speculate that there are the following two reasons: (i) The audio format or library version you downloaded does not match; (ii) The audio named tammy_1_07.wav is corrupted in your place. To further verify this problem, I suggest you to do a separate listening analysis, that is, to test the readability and audibility of the error audio with Adobe and other playback software; It is worth mentioning that I am using Python3.7, but I am concerned that you are using a higher version and may need to do other library matching as well. Hope this solves your problem. Good luck.

Viki520 commented 2 months ago

Thank you very much for your reply!I have solved the above problem,the reason I found the error was because there was a problem with the file name under my path。But at the same time, I discovered new problems:In line 263 of the feature_extraction.py, the magfile is given.It asks for an npy file but I didn't find any npy files or magfile folders from the MIR1K and Medley-DB datasets. I don't know how this npy was obtained. I would appreciate it if you could take time out of your busy schedule to answer my questions The following table describes the error message: Traceback (most recent call last): File "feature_extraction.py", line 270, in np.save(magfile, W) File "<__array_function__ internals>", line 6, in save File "/home/zhangjunwei/miniconda3/envs/TONet/lib/python3.7/site-packages/numpy/lib/npyio.py", line 525, in save file_ctx = open(file, "wb") FileNotFoundError: [Errno 2] No such file or directory: 'data/cfp_360_new/tammy_1_07.npy'

Viki520 commented 2 months ago

I've fixed the above issue thanks I found out that the error was caused by not creating a folder named cfp_360_new under data/

Annmixiu commented 2 months ago

Ok, your problem-solving skills are great! In addition, I want to tell you that "No such file or directory" type errors are usually problems with the path and file existence.

Viki520 commented 1 month ago

Hello, I'm very sorry, I still have a question, I found that I have to use some files in MedleyDB during training, but I can't download the MedleyDB dataset, can you give me a download link through a way like Baidu Netdisk?Thank you very much.

Annmixiu commented 1 month ago

Sorry, because MedleyDB is an application data set and the overall compression package is about 40.1G, I am not qualified to share it with you by Baidu Cloud disk. If you need to use this data set, I suggest you fill out an application form with the official. Here is the official website: https://steinhardt.nyu.edu/marl/research/resources/medleydb.