Repository navigation
Add a music profile to audio assets, read from ID3/Vorbis/MP4 tags - #46
Merged
Merged
Conversation
So Gecko Video Creator can find a soundtrack that fits a scene instead of
choosing by title. New nullable columns on Asset: genres, moods,
instruments (JSON lists), bpm, key, vocals and energy.
- Harvested on upload and by the existing re-read job from the tag block
ffprobe already returns: TCON/TMOO/TBPM/TKEY and lyrics for ID3, the
Vorbis GENRE/MOOD/BPM/INITIALKEY/LYRICS comments, MP4 genre/tmpo.
Fills blanks only, stamped "embedded". Audio only.
- URL import carries a site's genre onto audio imports.
- Editable in a new Music tab and through PATCH /api/assets/{id}.
- Indexed in a new asset_fts music_text column (rebuild + repopulate
migration) and in the asset's embedding text.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DCL4jm6ogZBBhnjEfBBaXU
Owner
Author
|
Backend (pytest) was cancelled before any test ran. It stopped in the "Ensure ffmpeg is available" step: the Azure Ubuntu mirror was serving ffmpeg's packages at about 30 s each, and the run was cancelled after 10 minutes while still downloading I can't re-run the job from here (the integration gets a 403). Please re-run the failed job: Re-run jobs → Re-run failed jobs on the run. Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Step 1 of making GAM a usable soundtrack source for Gecko Video Creator. Before this, an audio asset carried nothing about what it sounds like, so GVC could only choose music by its title.
What's added
New nullable columns on
Asset:music_genres,music_moods,music_instruments: JSON listsmusic_bpmmusic_keymusic_vocals: a nullable bool, where NULL means "not known", not "instrumental"music_energy: low / medium / highParsing lives in
backend/app/music.py.Filled from the file's own tags, on upload and by the existing "re-read file metadata" job (
harvest_attribution). Audio only:TCON,TMOO,TBPM,TKEY, andUSLTlyrics, which means the track has vocalsGENRE,MOOD,BPM,INITIALKEY,LYRICSgenre,tmpoThese come from the ffprobe tag block that
probe.pyalready returns. Like harvested attribution, they only fill blanks and are stampedembedded.Other ways in:
PATCH /api/assets/{id}. A list replaces the stored one, and[]clears it.Search:
asset_fts.music_textcolumn, and into the asset's embedding text.d71e4b9a2c86does the rebuild and repopulates the index, the same way9c2e08b4a1f7did for attribution. Adding the columns is a separate revision,c3a8f15e7b20.Renamed:
apply_embedded_attribution→apply_embedded_fields, since it now fills music fields as well.Design notes are in
docs/music-profile.md.Not in this PR
search_assetsreturning the profile to the assistant (step 2, in gvc)./api/assets.Testing
pytest -q: 1316 passed.tests/test_music.py, which runs against real MP3 and FLAC fixtures built bymake_fixtures.py.test_migrations.pythat seeds an index entry and a profile, upgrades, checks both are searchable, then downgrades.npm run format:check,npm run lint,npm test(412 passed, including the newMusicPanel.test.tsx) andnpm run buildare all clean.Generated by Claude Code