deezer / deezer/spleeter

[Bug] Various Errors using Spleeter Seperate with custom model.

Open
#394 16 comments 0 reactions 0 assignees View on GitHub
bug invalid
Dominant language
Python
Stars
28.4k
Forks
3.1k
PR merge metrics
No merged PRs in 30d

Description

## Description
I was originally having another [issue](https://github.com/deezer/spleeter/issues/390), but with help from @romi1502 that was resolved nicely.

However, as soon as that issue was fixed, I immediately got thrown several other issues.

## Step to reproduce

I managed to run the seperate command with my custom model, and it thought about it for a long time and powershell was eating up my CPU, so it was doing something.

I used the following spleeter imput command: `spleeter separate -i 'F:\BluRay 5.1\Done\S01E01 - Ambush\fullmix.wav' -o output -p F:\SpleetTest\Configs\filmModel.json`

## Output
After about 30-40 seconds I got the error:

```
Traceback (most recent call last):
File "c:\users\joe93\appdata\local\programs\python\python37\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\joe93\appdata\local\programs\python\python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\joe93\AppData\Local\Programs\Python\Python37\Scripts\spleeter.exe\__main__.py", line 9, in
File "c:\users\joe93\appdata\local\programs\python\python37\lib\site-packages\spleeter\__main__.py", line 54, in entrypoint
main(sys.argv)
File "c:\users\joe93\appdata\local\programs\python\python37\lib\site-packages\spleeter\__main__.py", line 46, in main
entrypoint(arguments, params)
File "c:\users\joe93\appdata\local\programs\python\python37\lib\site-packages\spleeter\commands\separate.py", line 45, in entrypoint
synchronous=False
File "c:\users\joe93\appdata\local\programs\python\python37\lib\site-packages\spleeter\separator.py", line 228, in separate_to_file
sources = self.separate(waveform, audio_descriptor)
File "c:\users\joe93\appdata\local\programs\python\python37\lib\site-packages\spleeter\separator.py", line 195, in separate
return self._separate_librosa(waveform, audio_descriptor)
File "c:\users\joe93\appdata\local\programs\python\python37\lib\site-packages\spleeter\separator.py", line 181, in _separate_librosa
outputs = sess.run(outputs, feed_dict=self._get_input_provider().get_feed_dict(features, stft, audio_id))
File "c:\users\joe93\appdata\local\programs\python\python37\lib\site-packages\tensorflow_core\python\client\session.py", line 956, in run
run_metadata_ptr)
File "c:\users\joe93\appdata\local\programs\python\python37\lib\site-packages\tensorflow_core\python\client\session.py", line 1156, in _run
(np_val.shape, subfeed_t.name, str(subfeed_t.get_shape())))
ValueError: Cannot feed value of shape (25836, 2, 6) for Tensor 'mix_stft:0', which has shape '(?, 2049, 2)'
```
I have so little experience with tensor, I don't know where to begin. From a few searches, this looks like a tensor issue with defining the parameters of the input (the sound files).

## Environment

| | |
| ----------------- | ------------------------------- |
| OS | Windows 10 (fully updated) |
| Installation type | pip |
| RAM available | 16GB |
| Hardware spec | RTX2080 / Ryzen R2600 |

## Additional context

Contributor guide

Open the contributing guide

Research direction

Reproduce the exact `spleeter separate` command with the custom `filmModel.json`, then start in `spleeter/commands/separate.py` and follow `separate_to_file`, `separate`, and `_separate_librosa` in `spleeter/separator.py`. Compare the custom model's expected input with the traceback and verify that separation completes without the TensorFlow shape error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, tensorflow
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.