Audio embeddings for music similarity search
-
It uses CoverHunterMPS to extract embeddings from audio files, downloaded on folder
$COVERHUNTER_FOLDER.git clone https://github.com/alanngnet/CoverHunterMPSA pretrained model is required in$MODEL_FOLDER -
ffmpegis used to covert the audio files -
Install dependencies with
pip install -r requirements.txt
-
- Run
python src/generate_dataset.pyto download the audio files from youtube to$MP3_FOLDER, convert them to mono wav files at 16kHz into$WAV_FOLDER, prepare the wav folder to be used by CoverHunterMPS to extract features and copy the hparams.yaml file to the wav folder
- Run
-
- Run
python src/get_embeddings_with_coverhunter.pyto get embeddings from the wav files after generating the features with CoverHunterMPS
- Run
-
- Run
python src/convert_embeddings_to_csv.pyto convert the embeddings to a csv file
- Run
-
- Run
python src/get_neighbors_to_estimate_precision.pyto estimate the precision of the model to get closest neighbors with same chords
- Run
-
- Run
python src/convert_csv_to_json.pyto convert the csv files to a json file compliant with Milvus vector database
- Run
- Run
python src/run_all.pyto run all the steps above