Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High frequencies get cut? #15

Closed
akx opened this issue Nov 4, 2019 · 8 comments
Closed

High frequencies get cut? #15

akx opened this issue Nov 4, 2019 · 8 comments
Labels
documentation Improvements or additions to documentation question Further information is requested

Comments

@akx
Copy link

akx commented Nov 4, 2019

Hey there!

Kudos for the project – the results are pretty impressive already!

However, I noticed the default 2-stem model and the 5-stem model seem to cut higher frequencies from the material, like a (Nyquist?) knife really. I ran spleeter on a certain US pop star's song about temperature differences, i.e.

spleeter separate -i hot_n_cold.wav -o . -c wav

where hot_n_cold.wav is a pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s stream, then jury-rigged this A/B test environment in FL Studio where one can compare the original version and the summed stems. You can probably tell from the spectrogram in the below screenshot where I flipped the crossfade slider over to the Spleetered (Spleeted?) version.

Screenshot 2019-11-04 at 10 02 43

The output stems are pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s, so it's not like the file itself is at fault here.

Is this expected? Can this be tuned/changed somehow?

@akx akx changed the title 2-stem model cuts high frequencies? High frequencies get cut? Nov 4, 2019
@faroit
Copy link
Contributor

faroit commented Nov 4, 2019

It looks like all models only output up to 11 kHz. Would be nice to know if this is part of the model or stems from the original training data

@mmoussallam
Copy link
Collaborator

Hey Aarni,

Thanks for your feedback. Indeed the default behavior is to cut frequencies above 11Khz but it can be changed in the settings. Read this comment for details.

@Faylixe Faylixe added documentation Improvements or additions to documentation question Further information is requested labels Nov 4, 2019
@faroit
Copy link
Contributor

faroit commented Nov 4, 2019

@mmoussallam but this still means that the models do not predict masks above 11khz, right? is this hardcoded in a training config?

@romi1502
Copy link
Member

romi1502 commented Nov 4, 2019

@faroit, yes, you're right: models are only trained until 11kHz and don't predict anything above.
This is set in the training config through the F parameter (see the wiki).
This is just a design choice that we made, when training the models we provide.

@Faylixe Faylixe closed this as completed Nov 4, 2019
@akx
Copy link
Author

akx commented Nov 4, 2019

@mmoussallam Thank you for the clarification!

@romi1502
Copy link
Member

We've just updated the FAQ for making clearer how you can actually perform separation above 11kHz.
Notably we pushed alternate configuration files (spleeter:2stems-16kHz, spleeter:4stems-16kHz and spleeter:5stems-16kHz) that perform separation up to 16kHz and explained how you can set upper separation frequency in the config file if you need another value.

@romi1502 romi1502 reopened this Dec 27, 2019
@khaleelyo
Copy link

Just a quick follow up,
I've been trying to incorporate the alternate 16kHz configuration using
spleeter separate -i audio_example.mp3 -o audio_output -p spleeter:4stems-16kHz
which raises the following error:
ERROR:spleeter:No embedded configuration 2stems-16kHz found
And
spleeter separate -i my_audio_file.mp3 -c spleeter:4stems-16kHz -o /output/path
which raises the following error:
spleeter separate: error: argument -c/--codec: invalid choice:

I'm currently running a Mac OSX, Python 3.7.3, I also attempted to reinstall spleeter with the same results. Any idea whats going on here?

Thanks,

@vkharatmal
Copy link

@khaleelyo

Try using this cmd :: python3 -m spleeter separate -i audio_example.mp3 -o output -p spleeter:2stems-16kHz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation question Further information is requested
Projects
None yet
Development

No branches or pull requests

7 participants