Turns the audio into a spectrogram: 64 frequency bands, one slice every 10 ms.
A small convolutional network reads it and scores every slice for "a cowbell was just hit here." It hears about 200 ms either side, so it catches the clank and the ring.
It learned from STAR Drums: 800 real songs whose drums were replayed on sampled acoustic kits, with every cowbell, ride bell and clave hit labeled.
Calls it cowbell when at least 10 hits land within one minute. 7 to 9 is a maybe.
Tested on 13 well-known cowbell songs, it says yes to 5 (Night Train, House of Jealous Lovers, Play That Funky Music, Little Sister, Mississippi Queen) and maybe to 2 (Don't Fear the Reaper, Drive My Car). It said no to all 15 rock songs without cowbell, All My Friends included. The cutoffs were picked looking at those same songs, so expect it to do a little worse on new music. It still misses Honky Tonk Women, New Body Rhumba and Daft Punk Is Playing at My House. Songs are analyzed up to 10 minutes. The demo cowbell is a VSCO-2 recording (CC0).
Behind the board: look at what the model heard, and correct it.
Spectrogram
0:00.000 / 0:00.000
Strong hit (70%+)Weaker hitSuggestedYou said cowbellYou said not cowbell
Click to play. Drag to scrub. ⌘-scroll or pinch to zoom, scroll sideways to pan. ⌥-drag selects a stretch. ←→ nudge 10 ms (⇧ for 100 ms), Space plays, Shift-click or M marks a missed cowbell.
Teach the model
Use the thumbs on each hit to say whether it's really a cowbell. Shift-click the spectrogram to add one it missed.
Help teach it
Mark hits with the thumbs, or Shift-click a cowbell it missed, and your labels are sent to improve the detector. Each label carries its time and about 6 seconds of spectrogram around it, never your audio. Labels are reviewed before they're used for training.