
Build a fake-track detector script
You'll have a working classifier that flags AI-generated uploads in your music library or pipeline using detection patterns from streaming platforms.
What you'll make
AI Track Detection Script
- analyze_metadata() — the pattern detector function: what to include
- load_detection_rules() — your custom rule definitions: what to include
- classify_track() — the scoring and decision logic: what to include
- main() — batch processing and output formatting: what to include
Paste your complete Python script that can run on a folder of music files
The 3 parts
Each part ends with a check you can see.
Sample Your Library by Hand
Manually examine 50 tracks from your collection to identify the obvious AI cases and tricky edge cases
Done when
A hand-labeled dataset of 50 tracks with at least 5 confirmed AI tracks and 3 ambiguous cases you're unsure about
Build the Pattern Detector
Code the analyze_metadata() function and test it against your hand-labeled samples to find what works
Done when
A working analyze_metadata() function that correctly flags at least 80% of your confirmed AI tracks while minimizing false positives on human artists
Handle the Edge Cases
Build the override system for cases where pattern detection fails and human judgment is required
Done when
A complete script with load_detection_rules() and classify_track() functions that handles ambiguous cases through documented override rules
Capstone: you put together your AI Track Detection Script.
Where this helps
An elective: a single lesson that sits outside rtwo's job certificates and doesn't count toward one.
About this lesson
What you'll be able to do
- Run a working classifier script on at least 50 tracks from your actual music library
- Identify 3-5 detection patterns where AI music reveals itself systematically
- Have a documented override ruleset for edge cases your classifier keeps missing
- Know when to trust automated detection vs when human judgment is required
Who it's for
- Music library curators dealing with submission floods
- Playlist managers who suspect AI infiltration but can't prove it
- Anyone with a large music collection wondering how much is actually AI-generated
What it won't cover
- Audio signal processing or spectral analysis techniques
- Legal questions about AI music copyrights or royalties
- Building production-grade systems for streaming platforms
- Training your own AI detection models from scratch
Skills you'll practise
- Metadata pattern recognition
- Behavioral detection rule design
- Classification threshold calibration
- Human-AI judgment boundaries