feat: recommend from Deezer and YouTube Music radios
- Deezer: /artist/{id}/radio for collection artists, affinity 2.0
- YouTube Music: RDAMVM watch playlist via yt-dlp, affinity 2.0
- seed radios from the 2 newest songs of the mood's own catalog
- dedupe candidates by recording, not only by external id
- clean raw YouTube titles and Topic suffixes when indexing
- tests, smoke marker for the RDAMVM path, docs
This commit is contained in:
1 parent
62bcefad20
commit
26c41cc7d9
12 files changed
+296
-44
No files matched your search
@@ -260,13 +260,18 @@ States: `new` (hidden candidate pool), `downloading`, `ready`, `failed`,
|
||||
1. **Text queries**: `query`, then up to 3 collection artists ordered by how
|
||||
many songs the mood has, then up to 2 genres, capped at 4 queries.
|
||||
2. **Catalog similarity graph** (`MusicCatalog.discover`): up to 5 collection
|
||||
artists -> their top tracks; up to 2 of those artists' related artists ->
|
||||
their top tracks; up to 2 collection albums -> album deep cuts. Deezer
|
||||
implements this; YouTube Music has no such API and returns nothing.
|
||||
artists -> their **radio** (`/artist/{id}/radio`, the platform's own mix)
|
||||
and top tracks; up to 2 of those artists' related artists -> their top
|
||||
tracks; up to 2 collection albums -> album deep cuts. YouTube Music runs
|
||||
the `RDAMVM<videoId>` watch-playlist radio for the 2 newest collection
|
||||
songs, which is the same queue its player builds (`yt-dlp
|
||||
--flat-playlist`), so it also returns real recommendations.
|
||||
- Scoring: exact collection artist `3.0 + 0.5` per extra song (capped `+1.5`),
|
||||
partial artist `1.5`, album already in the collection `+1.0`, catalog
|
||||
affinity (related artist `1.5`, album deep cut `1.0`, artist top `0.5`),
|
||||
mood words in the title `+1.0`, over 8 minutes `-1.0`.
|
||||
affinity (platform radio `2.0`, related artist `1.5`, album deep cut `1.0`,
|
||||
artist top `0.5`), mood words in the title `+1.0`, over 8 minutes `-1.0`.
|
||||
- A recording is deduplicated by `(artist, title)` as well as by external id, so
|
||||
two uploads of a song already in the mood do not both enter the pool.
|
||||
- Stores up to a bounded pool of `new` candidates (60). Excludes external ids
|
||||
already in `mood_songs`, `added` or `rejected`.
|
||||
- `topUp(mood, force)`:
|
||||
@@ -322,14 +327,17 @@ What this server reproduces without telemetry:
|
||||
| Signal | Here | There |
|
||||
|---|---|---|
|
||||
| Taste profile | whole mood collection, artists weighted by song count + albums | per-user history and playlists |
|
||||
| Similarity | catalog graph (related artists, artist top tracks, album deep cuts) + text queries | learned embeddings + co-occurrence |
|
||||
| Similarity | the platform's own radio (Deezer artist radio, YouTube `RDAMVM`) + catalog graph + text queries | learned embeddings + co-occurrence |
|
||||
| Feedback | add / not interested (permanent) | skips, saves, play counts, survey models |
|
||||
| Context | mood hint, genres, refresh window | session, time of day, device, activity |
|
||||
| Ranking | weighted score + per-artist diversity penalty | deep rankers with hundreds of features |
|
||||
|
||||
Not reproducible here: cross-user collaborative filtering, audio analysis and
|
||||
sequence models. The add/reject lifecycle and the collection itself are the
|
||||
only behavioural signals, which is why discovery leans on the catalog graph.
|
||||
only behavioural signals, which is why discovery leans on the platforms' own
|
||||
radio endpoints. Spotify is not an option: its `/v1/recommendations`, related
|
||||
artists, audio features and audio analysis were removed for new apps on
|
||||
2024-11-27, and its terms forbid training on Spotify content.
|
||||
|
||||
### 4.4 Download pipeline
|
||||
|
||||
@@ -711,8 +719,8 @@ Phases 1-8 are implemented in both repositories.
|
||||
- Deezer is the default for new moods; every mood stores its own source and
|
||||
can switch it, which clears the active recommendation pool and refills it.
|
||||
- Chart 0.4.0 adds `DEFAULT_SOURCE`, `DEEZER_*` and an optional ARL secret.
|
||||
- Tests: 94 server tests, 66-step smoke test with fake `yt-dlp`, `rip` and a
|
||||
fake Deezer API (including the artist graph).
|
||||
- Tests: 97 server tests, 67-step smoke test with fake `yt-dlp`, `rip` and a
|
||||
fake Deezer API (including the artist graph and both radio paths).
|
||||
|
||||
### Client
|
||||
|
||||
|
||||
Reference in new issue
Block a user