- migration 00006: track features and embeddings (pgvector, HNSW), analysis queue filled by a trigger on new tracks, wave sessions and impressions, recommender profiles, model versions - analyzer basic-1 (ADR-014): ffmpeg decode, three 30 s excerpts, 256-d timbre/rhythm embedding, tempo by onset autocorrelation, key, loudness, energy, danceability, acousticness, intro length; worker with SKIP LOCKED claims, retries and re-analysis on version change - wave engine v1: candidates (session/taste similarity, fresh, liked artists, rediscover, popular, exploration, seed), filters (dislikes, played in 3 h, already served), heuristic score, activity and mood fit from contexts.yaml with relaxing thresholds, MMR with one track per artist, exploration share, session vector updated by reactions and a change of course after three skips - POST /internal/wave/batch with the catalog index cached in memory and the session kept in Redis Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
57 lines
1.9 KiB
YAML
57 lines
1.9 KiB
YAML
# Занятия и настроения «Моей волны» (docs/recommendations.md#64-занятия-и-настроения).
|
|
# Каждое правило — «колокол» по признаку трека: внутри [min, max] — 1, снаружи спадает по Гауссу с sigma.
|
|
# Признак, которого у трека нет (ещё не проанализирован), не штрафует.
|
|
# Изменения применяются после перезапуска recommender, пересборка образа не нужна (CONTEXTS_PATH).
|
|
activities:
|
|
running:
|
|
icon: directions_run
|
|
rules:
|
|
- {feature: bpm, min: 150, max: 185, sigma: 12, half_time: true}
|
|
- {feature: energy, min: 0.7, sigma: 0.12}
|
|
- {feature: danceability, min: 0.5, sigma: 0.2}
|
|
workout:
|
|
icon: fitness_center
|
|
rules:
|
|
- {feature: energy, min: 0.75, sigma: 0.1}
|
|
- {feature: bpm, min: 110, max: 180, sigma: 20, half_time: true}
|
|
waking_up:
|
|
icon: wb_sunny
|
|
rules:
|
|
- {feature: energy, min: 0.3, max: 0.7, sigma: 0.12}
|
|
- {feature: valence, min: 0.5, sigma: 0.15}
|
|
focus:
|
|
icon: headphones
|
|
rules:
|
|
- {feature: energy, min: 0.3, max: 0.6, sigma: 0.12}
|
|
- {feature: acousticness, min: 0.3, sigma: 0.25}
|
|
commute:
|
|
icon: directions_car
|
|
rules:
|
|
- {feature: energy, min: 0.4, max: 0.8, sigma: 0.15}
|
|
chill:
|
|
icon: weekend
|
|
rules:
|
|
- {feature: energy, max: 0.5, sigma: 0.12}
|
|
sleep:
|
|
icon: bedtime
|
|
rules:
|
|
- {feature: energy, max: 0.35, sigma: 0.1}
|
|
- {feature: bpm, max: 95, sigma: 12}
|
|
moods:
|
|
energetic:
|
|
icon: bolt
|
|
rules:
|
|
- {feature: energy, min: 0.7, sigma: 0.12}
|
|
happy:
|
|
icon: sentiment_satisfied
|
|
rules:
|
|
- {feature: valence, min: 0.6, sigma: 0.12}
|
|
calm:
|
|
icon: spa
|
|
rules:
|
|
- {feature: energy, max: 0.45, sigma: 0.12}
|
|
sad:
|
|
icon: rainy
|
|
rules:
|
|
- {feature: valence, max: 0.4, sigma: 0.12}
|