Open ghost opened 6 years ago
It seems like a problem with musdb. Did you test the installation of musdb as provided in their readme
What I did is install musdb using pip install musdb.
Then, according to your provided link and section: "Test if your separation function generates valid output", I uncommented the mus.run part and instead enabled the provided mus.test part within the test.py file, which looks like this: mus.test(separate) exit()
and then, the output is simply this: (C:\Users\user22\Miniconda3) C:\deepsep>python test.py Using TensorFlow backend.
The script seems to take a little while before I return to command line, suggesting that something is perhaps happening, however my output folder is still empty, so obviously nothing was done. This is strange. Then again, I am on Windows, not sure if that has something to do with it, but it shouldn't.
Also, according to that link you provided, "The function returns True if the test succeeds." but I don't get any output text or whatever, just "Using TensorFlow backend." and then after 2 seconds comes back to the command line without additional errors. This is very interesting problem, then again you didn't finish the entire code, so maybe this can be fixed later or something. Let me know what you think on how to maybe resolve this. Thank you!
Hi, just saw this project... maybe I can help.... to check if the track loading works:
tracks = mus.load_mus_tracks()
this should return the list of all musdb track objects.
Then you can also use this to process individual tracks like this:
mus.run(..., tracks=tracks[0], ...)
or iterate through all tracks manually:
for track in tracks:
track.audio # the mixture
Hi, just saw this project... maybe I can help.... to check if the track loading works:
tracks = mus.load_mus_tracks()
this should return the list of all musdb track objects.
Then you can also use this to process individual tracks like this:
mus.run(..., tracks=tracks[0], ...)
or iterate through all tracks manually:
for track in tracks: track.audio # the mixture
Hi faroit,
Hope I can ask this here. I am having a similar problem as the thread owner. I tried what you said and have got the list of track objects "tracks" according to
tracks = mus.load_mus_tracks()
However, now when I try to iterate through it OR simply access tracks[0].audio I get a big error as follows that ultimately returns
"FileNotFoundError: [WinError 2] The system cannot find the file specified"
Any tips on what's going on?
I guess there is some path problem. Did you set the root path correctly?
I think so. I downloaded the dataset folder into my directory and got its directory using the os library.
`import musdb
mus = musdb.DB( root_dir='C:\Users\SJay_747\keras-unet-vocal-separation-master\FYP\dataset' )
tracks = mus.load_mus_tracks() tracks[0].audio`
"dataset" is a folder that contains two sub folders: "train" and "test". As far as I'm aware everything has been done correctly. Do you notice any mistakes in my approach?
"dataset" is a folder that contains two sub folders: "train" and "test". As far as I'm aware everything has been done correctly. Do you notice any mistakes in my approach?
looks okay to me. Have you tried printing the track list, print(tracks)
or checking if the actual audio path is correct? print(tracks[0].path)
"dataset" is a folder that contains two sub folders: "train" and "test". As far as I'm aware everything has been done correctly. Do you notice any mistakes in my approach?
looks okay to me. Have you tried printing the track list,
print(tracks)
or checking if the actual audio path is correct?print(tracks[0].path)
Foremost, I really appreciate you taking the time to help me. Thank you.
Yes, I have printed the track list and weirdly enough I am getting the full 150 tracks within the list.
Upon your suggestion I did: print(tracks[0].path)
and got the following print out:
C:\Users\SJay_747\keras-unet-vocal-separation-master\FYP\dataset\train\A Classic Education - NightOwl.stem.mp4
The current directory i am running the code from is:
C:\Users\SJay_747\keras-unet-vocal-separation-master\FYP
Do I need to be in the same directory as the file path to access the audio content or something like that?
Update: I changed the directory to the train folder before trying to access the track's audio and still received the same error. I can send you a full readout of the error if that'd help?
Do I need to be in the same directory as the file path to access the audio content or something like that?
no that should be fine. The paths look good. can you cite the full error log?
`FileNotFoundError Traceback (most recent call last)
This readout is a lot clearer:
`FileNotFoundError Traceback (most recent call last)
<ipython-input-217-562f411355ab> in <module>
7 tracks = mus.load_mus_tracks()
8 print(tracks[0].path)
----> 9 tracks[0].audio
c:\users\sjay_747\appdata\local\programs\python\python36\lib\site-packages\musdb\audio_classes.py in audio(self)
222 audio, rate = stempeg.read_stems(
223 filename=self.path,
--> 224 stem_id=self.stem_id
225 )
226 else:
c:\users\sjay_747\appdata\local\programs\python\python36\lib\site-packages\stempeg\read.py in read_stems(filename, out_type, stem_id, start, duration, info)
118 """
119 if info is None:
--> 120 FFinfo = Info(filename)
121 else:
122 FFinfo = info
c:\users\sjay_747\appdata\local\programs\python\python36\lib\site-packages\stempeg\read.py in __init__(self, filename)
18 super(Info, self).__init__()
19 self.filename = filename
---> 20 self.json_info = read_info(self.filename)
21
22 @property
c:\users\sjay_747\appdata\local\programs\python\python36\lib\site-packages\stempeg\read.py in read_info(filename)
73 ]
74
---> 75 out = sp.check_output(cmd)
76 info = json.loads(out.decode('utf-8'))
77 return info
~\AppData\Local\Programs\Python\Python36\Lib\subprocess.py in check_output(timeout, *popenargs, **kwargs)
334
335 return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
--> 336 **kwargs).stdout
337
338
~\AppData\Local\Programs\Python\Python36\Lib\subprocess.py in run(input, timeout, check, *popenargs, **kwargs)
401 kwargs['stdin'] = PIPE
402
--> 403 with Popen(*popenargs, **kwargs) as process:
404 try:
405 stdout, stderr = process.communicate(input, timeout=timeout)
~\AppData\Local\Programs\Python\Python36\Lib\subprocess.py in __init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, encoding, errors)
707 c2pread, c2pwrite,
708 errread, errwrite,
--> 709 restore_signals, start_new_session)
710 except:
711 # Cleanup if the child failed starting.
~\AppData\Local\Programs\Python\Python36\Lib\subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_start_new_session)
995 env,
996 os.fspath(cwd) if cwd is not None else None,
--> 997 startupinfo)
998 finally:
999 # Child is launched. Close the parent's copy of those pipe
FileNotFoundError: [WinError 2] The system cannot find the file specified`
i think its related to stempeg
and this issue. Did you update to version 0.1.6 of stempeg?
So the only installation of stempeg I've done is:
pip install stempeg
and when I type that into my cmd prompt I get the above image. It appears as though verison 0.1.6 is downloaded according to the first line of the prinout.
I think it is worth noting that when I run the standard command from stempeg:
stem, rate = stempeg.read_stems(stempeg.example_stem_path())
I also receive the exact same error! Strange. Is there a fix for this? The post you linked me to suggests that have the most recent stempeg library will sort it out but this isn't the case for me.
I guess this is a windows related problem. Will have to figure this out. In the meantime I would suggest you convert to wav in the meantime ans use the is_wav
flag in musdb
stem, rate = stempeg.read_stems(stempeg.example_stem_path())
can you try to run ffprobe
in the commandline with any of the paths?
When I run ffprobe I get the following:
I am suspicious that I haven't installed ffmpeg properly. I only installed it using
pip install ffmpeg
Is the installation process as trivial as this or do I need to do something more?
Is the installation process as trivial as this or do I need to do something more?
no thats wrong, you cannot install ffmpeg with pip. See installation instructions here
Is the installation process as trivial as this or do I need to do something more?
no thats wrong, you cannot install ffmpeg with pip. See installation instructions here
OK got it. I plan to install it using Docker then. However, it appears my windows is not Windows Pro or Enterprise - is there any way to install ffmpeg without using Docker on Windows or is that the only way?
You don't need docker to install ffmpeg. Just use anaconda for this as described in the instructions
I have all requirements and everything seems to run in terms of script, but it doesn't seem to find some file(s), and I am not even sure what files it is looking for. I followed all the steps with the config input and output. I ran the default test.py using all default parameters. The log is here:
(C:\Users\user22\Miniconda3) C:\deepsep>python test.py Using TensorFlow backend. 0%| | 0/4 [00:00<?, ?it/s]T raceback (most recent call last): File "test.py", line 17, in
estimates_dir=result_dir)
File "C:\Users\user22\Miniconda3\lib\site-packages\musdb__init.py", line 397
, in run
total=len(tracks)
File "C:\Users\user22\Miniconda3\lib\site-packages\tqdm_tqdm.py", line 955, in
iter
for obj in iterable:
File "C:\Users\user22\Miniconda3\lib\site-packages\musdb__init__.py", line 393
, in
estimates_dir
File "C:\Users\user22\Miniconda3\lib\site-packages\musdb__init__.py", line 315
, in _process_function
user_results = user_function(track)
File "C:\deepsep\separate.py", line 16, in separate
testcaseL,angleL=make_stft( [track.audio[:,0]])
File "C:\Users\user22\Miniconda3\lib\site-packages\musdb\audio_classes.py", lin
e 206, in audio
stem_id=self.stem_id
File "C:\Users\user22\Miniconda3\lib\site-packages\stempeg\read.py", line 91, i
n read_stems
FFinfo = FFMPEGInfo(filename)
File "C:\Users\user22\Miniconda3\lib\site-packages\stempeg\read.py", line 19, i
n init__
self.json_info = read_info(self.filename)
File "C:\Users\user22\Miniconda3\lib\site-packages\stempeg\read.py", line 55, i
n read_info
out = sp.check_output(cmd)
File "C:\Users\user22\Miniconda3\lib\subprocess.py", line 336, in check_output
*kwargs).stdout
File "C:\Users\user22\Miniconda3\lib\subprocess.py", line 403, in run
with Popen(popenargs, **kwargs) as process:
File "C:\Users\user22\Miniconda3\lib\subprocess.py", line 709, in init
restore_signals, start_new_session)
File "C:\Users\user22\Miniconda3\lib\subprocess.py", line 997, in _execute_chil
d
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified