gvne / spleeterpp

A C++ Inference library for the Spleeter project
MIT License
162 stars 33 forks source link

Use spleeter 16KHz Models #15

Closed gvne closed 4 years ago

gvne commented 4 years ago

See https://github.com/gvne/vstSpleeter/issues/2

We would need to:

aidv commented 4 years ago

Once again, amazing work.

What dictates which model is being used?

Would it be possible to load a different model during runtime?

diracdeltas commented 4 years ago

in case it helps anyone, i got this working with the 16khz models using https://github.com/diracdeltas/spleeterpp/commit/5a6c99d9e470b9329e1349bbcf4fc468abb05bdf

note that i only did it for 4stems because that's the only model that i care about for DJing :)

gvne commented 4 years ago

Thank you @diracdeltas ! That is a huge help.

diracdeltas commented 4 years ago

@gvne no problem, thank you for making this! i didn't actually have do any vstspleeter changes at all

aidv commented 4 years ago

@diracdeltas yo, I tried your 16kHz changes for vstSpleeter, but comparing the frequency spectrum with standard Spleeter 16kHz it seems to not actually be 16kHz.

Wanna help me out?

aidv commented 4 years ago

Nvm I think I figured it out.

I think spleeterpp needs to be updated.

aidv commented 4 years ago

@diracdeltas It seems like I'm running in to the same issue as you did on https://github.com/gvne/vstSpleeter/issues/5#issuecomment-631620622

I wonder what the difference is between original spleeterpp and your fork.

I can't find a difference other than the obvious ones. Other than that, I can't see why the models aren't downloaded.

aidv commented 4 years ago

@diracdeltas yeah I can't get it to work. If you feel like helping me out I'd greatly appreciate it. Feel free to join my Discord again and we can go through it step by step and maybe get another easy to use update for spleeterpp and vstSpleeter again.

Edit: I think I managed to build with the 16 kHz models but when I use those exact models, the VST just crashes. Frick!

diracdeltas commented 4 years ago

@aidv i wrote up my instructions in https://github.com/diracdeltas/vstSpleeter#build. someone else also said they were getting a crash every time but i can't replicate it. feel free to post a crash report and i'll take a look.

aidv commented 4 years ago

@diracdeltas The instructions are a little confusing and seem to be incomplete. I followed exactly what you have stated on your repo.

For example you write "Download and install JUCE". Download from website or from repo? Install where? In C:\? In root of where spleeterpp and vstSpleeter resided? Anywhere?

On Building instruction point one you say "replace Xcode with ""Visual Studio 15 2017 Win64" ". What Xcode? Do you mean -GXcode? Where?

Your JUCER project VS2017 export contains a reference to VST3 SDK, something you did not mention in your instructions.

Right out the box I was presented with the following errors upon building in Release mode in VS2017: LINK : fatal error LNK1181: cannot open input file '..\..\external\spleeterpp\lib\spleeter_filter.lib' and fatal error C1083: Cannot open include file: 'spleeter_filter/filter.h': No such file or directory (compiling source file ..\..\Source\PluginProcessor.cpp

I'm looking at the VS2017 export settings and I can see that all paths in External Compiler Flags and External Libraries to Link point towards ../../external/spleeter/lib and ../../external/spleeter/include, however, when I check those paths, only "lib" exists and it only has the file "tensorflow.lib".

Edit:

Yeah, this isn't working for me.

@gvne library works but doesn't have the 16kHz models, and @diracdeltas doesn't properly install all things where they should be.

I'm so confused.

gvne commented 4 years ago

Implemented in branch develop.

Following @diracdeltas work, I've updated the model generation scripts. I also added the spleeter_enable_high_resolution cmake parameter. To use the 16KHz process extension you should just have to enable that option:

cmake -Dspleeter_enable_high_resolution=ON [other options] ..
aidv commented 4 years ago

@gvne Worked perfectly!

kyab commented 4 years ago

-Dspleeter_enable_high_resolution=ON works for me too. Great!