ansa-aboudou / songsplit

Personnal project for seperating the vocals from the beat of a song.
http://songsplit.herokuapp.com
MIT License
2 stars 0 forks source link

Inference in tensorflowjs #2

Open shoegazerstella opened 4 years ago

shoegazerstella commented 4 years ago

Have you tried performing the inference by converting the model into tensorflowjs?

I made some trials here. Could you share any code for the inference? Thanks a lot!

ansa-aboudou commented 4 years ago

I planed to work on that but unfortunately I did not have the time... If you ever manage to perform the conversion I would be very interested to know it !

shoegazerstella commented 4 years ago

I uploaded the savedModels and tfjs conversion here for the 2stems spleeter model. Feel free to use them.

Apparently it is now possible to run a tf SavedModel in nodejs without conversion, see related blog post here. That's cool considering the conversion to tfjs is sometimes tricky.

Any idea on how you would do the preprocessing of the audio in js?

ansa-aboudou commented 4 years ago

@shoegazerstella Sorry for my late answer. Thank you for sharing it is very useful, regarding the waveform I took a look in the python code and it just looks like a simple vector. I think that now we have to look for a way to translate an audio file to a waveform in JS.

luiherch commented 3 years ago

I uploaded the savedModels and tfjs conversion here for the 2stems spleeter model. Feel free to use them.

Apparently it is now possible to run a tf SavedModel in nodejs without conversion, see related blog post here. That's cool considering the conversion to tfjs is sometimes tricky.

Any idea on how you would do the preprocessing of the audio in js?

@shoegazerstella Could you explain me how did you get the savedModel (saved_model.pb and variables) from the provided pretrained models??

shoegazerstella commented 3 years ago

@luiherch check this issue However, they made some change to the original code now and I am not sure this will still work, you should maybe checkout to an older version