Add MFCC pHash generation for chord transcription#1
Add MFCC pHash generation for chord transcription#1google-labs-jules[bot] wants to merge 2 commits intomainfrom
Conversation
- Implement `app/database.py` for storing pHash and chord symbol pairs in SQLite. - Update `app/tasks/chord_tasks.py` in `e2e_base_ready_task` to compute MFCC and pHash for detected chord segments using `librosa` and `ImageHash`. - Add `ImageHash` and `Pillow` to `requirements.txt`. - Save the pHash-chord pair to the database.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. New to Jules? Learn more at jules.google/docs. |
- Introduce `app/database.py` to manage SQLite database for caching and fingerprints.
- Update `app/tasks/chord_tasks.py` to:
- Compute pHash of input audio files to cache full pipeline results.
- Compute pHash of individual chord segments to build a chord fingerprint database.
- Update `app/schemas.py` to allow optional URLs for cached results.
- Add `ImageHash` and `Pillow` to `requirements.txt`.
This PR adds functionality to generate perceptual hashes (pHash) from MFCC features of audio segments corresponding to detected chords.
Changes:
app/database.pyto handle SQLite connection andchord_fingerprintstable creation. It providessave_phash_chord_pairfunction and a context manager for DB transactions.e2e_base_ready_taskinapp/tasks/chord_tasks.pyto:librosa.librosa.ImageHash.ImageHashandPillowtorequirements.txt.This feature allows for fingerprinting of chord audio segments which can be used for downstream tasks like retrieval or comparison.
PR created automatically by Jules for task 3374808773528310123 started by @Party4Bread