deezer / deezer/spleeter

[Discussion] Why Two Columns returned by Waveform based Separation?

Open
#849 3 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
Python
Stars
28.4k
Forks
3.1k
PR merge metrics
No merged PRs in 30d

Description

Could you please provide more context about the two columns returned by the [raw waveform based separation](https://github.com/deezer/spleeter/wiki/4.-API-Reference#raw-waveform-based-separation) method?

I noticed there are two columns for each stem, and this is consistent across 2, 4, and 5 stem models.

For example, when we look at the vocals, they are returned in two columns. When I play the data represented by the first column, it sounds like the vocals. When I play the data represented by the second column, it also sounds like the vocals. However their values are slightly different.

So why are there two columns? What is the difference between their values? If we want to represent the vocals, should we use the first column, or second column, or both, or an average?

Thanks!

```py
import numpy as np
from spleeter.separator import Separator

n_stems = 5
model_name = f"spleeter:{n_stems}stems"
sep = Separator(model_name)

splits = sep.separate(audio_data)
print(splits.keys()) #> ['vocals', 'piano', 'drums', 'bass', 'other']

vocals = splits["vocals"]
print(vocals.shape) #> (661504, 2)
```

```
vocals_0 vocals_1
0 -0.006651 -0.006851
1 -0.006996 -0.007341
2 -0.008933 -0.009481
3 -0.010609 -0.011479
4 -0.009787 -0.010852
... ... ...
66145 0.036674 0.036603
66146 0.016356 0.016560
66147 -0.001799 -0.001414
66148 -0.011917 -0.011444
66149 -0.016360 -0.015921
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.