🎵 AudioMuse AI v0.1.5-alpha
Release Date: May 27, 2025
Summary
AudioMuse AI v0.1.5-alpha significantly expands our intelligent playlist generation capabilities by integrating Gaussian Mixture Models (GMM) into the Monte Carlo evolutionary clustering engine. This addition provides a powerful, probabilistic approach to understanding and grouping your music library.
Building on the evolutionary framework introduced in v0.1.4-alpha, this release allows the system to now optimize parameters for K-Means, DBSCAN, and GMM, including its specific parameters like the number of components. The "weighted diversity score" continues to guide the selection of the best clustering strategy, aiming for rich and varied playlists.
Users can now leverage the flexibility of GMMs, which can model more complex, elliptical cluster shapes, alongside the existing algorithms, all configurable through the web UI.
These enhancements further our goal of providing a robust, diverse, and highly customizable music discovery experience through intelligent playlist generation.
✨ Key Features Added in This Release
- Gaussian Mixture Model (GMM) Integration:
- GMM is now available as a selectable clustering algorithm in the evolutionary framework.
- The system can evolve the number of components for GMM (
GMM_N_COMPONENTS_MIN
,GMM_N_COMPONENTS_MAX
) to find optimal probabilistic clusters. - GMM allows for modeling more flexible cluster shapes (using
'full'
covariance by default in the task).
- Enhanced Evolutionary Engine:
- The Monte Carlo evolutionary clustering now supports parameter optimization for GMM alongside K-Means, DBSCAN, and PCA.
- Updated UI for GMM Configuration:
- The web interface now includes options to specify the min/max range for GMM components when GMM is selected as the clustering method.
🛠️ Detailed File Changes & Function Modifications
app.py
(Backend Logic & API)
run_clustering_task
(Celery Task):- GMM Clustering Logic:
- Added a new
elif clustering_method == "gmm":
block to handle GMM. - Randomly samples
current_gmm_n_components
for each GMM run based on user-defined ranges. - Initializes
sklearn.mixture.GaussianMixture
with the sampled number of components, theGMM_COVARIANCE_TYPE
fromconfig.py
(task currently defaults to'full'
), and amax_iter
of 1000. - Fits the GMM to the data, predicts cluster labels, and extracts cluster means (
gmm.means_
) for use as centroids. - Stores GMM-specific parameters (like
current_gmm_n_components
) inbest_parameters_found
if the current run yields the best diversity score.
- Added a new
- Parameter Signature Update: The function now accepts
gmm_n_components_min
andgmm_n_components_max
as arguments.
- GMM Clustering Logic:
/api/clustering/start
(API Endpoint):- Updated to receive new range parameters for GMM (
gmm_n_components_min
,gmm_n_components_max
) from the frontend request. - These GMM-specific parameters are now passed to the
run_clustering_task.delay()
Celery call.
- Updated to receive new range parameters for GMM (
/api/config
(API Endpoint):- The JSON response now includes the default GMM parameter ranges (
GMM_N_COMPONENTS_MIN
,GMM_N_COMPONENTS_MAX
) read fromconfig.py
, allowing the frontend to display them.
- The JSON response now includes the default GMM parameter ranges (
index.html
(Frontend User Interface)
- "Generate Playlists" Form (
playlistForm
):- New Clustering Method Option: "Gaussian Mixture Model (GMM)" has been added to the clustering method
<select>
dropdown. - New GMM Input Fields: A dedicated section for GMM parameters (within a
div
withid="gmm_options"
) now dynamically appears when GMM is selected. This section allows users to input "GMM Min Components" and "GMM Max Components." - Dynamic UI: The JavaScript function
toggleClusteringOptions
has been updated to correctly show/hide the GMM-specific input fields based on the user's selection.
- New Clustering Method Option: "Gaussian Mixture Model (GMM)" has been added to the clustering method
- JavaScript Logic:
populateConfig()
: This function now fetches and sets the default values for the new GMM input fields (min/max components) from the/api/config
endpoint during page load.playlistForm
submit event listener: When the form is submitted and GMM is the chosen method, the values from the GMM component range inputs are collected and included in the JSON payload sent to the/api/clustering/start
backend endpoint.
config.py
(Configuration)
- New GMM Constants:
- Added
GMM_N_COMPONENTS_MIN
(defaulting to20
) andGMM_N_COMPONENTS_MAX
(defaulting to60
) to define the default evolutionary search range for the number of GMM components. - Added
GMM_COVARIANCE_TYPE
(defaulting to'full'
) to specify the default covariance type for GMM.
- Added
- The comment for
CLUSTER_ALGORITHM
has been updated to includegmm
as an accepted value.
What's Changed
- Devel -> Main: GMM cluster algorithm added by @NeptuneHub in #3
Full Changelog: v0.1.4-alpha...v0.1.5-alpha