jordipons / musicnn

Pronounced as "musician", musicnn is a set of pre-trained deep convolutional neural networks for music audio tagging.
ISC License
599 stars 87 forks source link

Input from memory for tagger #9

Open inspiralpatterns opened 4 years ago

inspiralpatterns commented 4 years ago

It could be nice to have the option to use a file-like as input audio file for the tagger - or more broadly, a file from memory. I see this particularly applicable in a case where audio files have to be disposed after auto tagging, i.e. the service lives in the cloud with limited resources. Python tempfile.TemporaryFile() would be the best option to use given such scenario.

Librosa docs suggest to use directly soundfile library and then resample to achieve the same effect as librosa.load().