Fix build

This commit is contained in:
2025-11-27 17:43:52 +01:00
parent 95194eadfc
commit 679e179edc
13 changed files with 7645 additions and 23 deletions

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Download Essentia models for audio classification
# Models from: https://essentia.upf.edu/models.html
@@ -14,18 +14,11 @@ echo "Models directory: $MODELS_DIR"
# Create models directory if it doesn't exist
mkdir -p "$MODELS_DIR"
# Model files
declare -A MODELS
MODELS=(
["mtg_jamendo_genre-discogs-effnet-1.pb"]="$BASE_URL/mtg_jamendo_genre/mtg_jamendo_genre-discogs-effnet-1.pb"
["mtg_jamendo_moodtheme-discogs-effnet-1.pb"]="$BASE_URL/mtg_jamendo_moodtheme/mtg_jamendo_moodtheme-discogs-effnet-1.pb"
["mtg_jamendo_instrument-discogs-effnet-1.pb"]="$BASE_URL/mtg_jamendo_instrument/mtg_jamendo_instrument-discogs-effnet-1.pb"
)
# Download each model
for model_file in "${!MODELS[@]}"; do
url="${MODELS[$model_file]}"
output_path="$MODELS_DIR/$model_file"
# Download function
download_model() {
local model_file="$1"
local url="$2"
local output_path="$MODELS_DIR/$model_file"
if [ -f "$output_path" ]; then
echo "$model_file already exists, skipping..."
@@ -40,7 +33,17 @@ for model_file in "${!MODELS[@]}"; do
exit 1
fi
fi
done
}
# Download each model
download_model "mtg_jamendo_genre-discogs-effnet-1.pb" \
"$BASE_URL/mtg_jamendo_genre/mtg_jamendo_genre-discogs-effnet-1.pb"
download_model "mtg_jamendo_moodtheme-discogs-effnet-1.pb" \
"$BASE_URL/mtg_jamendo_moodtheme/mtg_jamendo_moodtheme-discogs-effnet-1.pb"
download_model "mtg_jamendo_instrument-discogs-effnet-1.pb" \
"$BASE_URL/mtg_jamendo_instrument/mtg_jamendo_instrument-discogs-effnet-1.pb"
echo ""
echo "✅ All models downloaded successfully!"