arXiv:2610.25371cs.SDOct 2026

Manuscript Offprint

arXiv:2610.25371

Whistle and Wrong Lyrics: Synthetic Queries Are Not Enough for Real-World Query-by-Melody

Luigi Rivolta

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

People look up a song by humming it, but also by whistling it or singing it with the wrong words. Published query-by-humming systems and benchmarks focus on hums and sung queries; whistles and wrong-lyrics singing are rarely studied, and no public dataset pairs them with song recordings. We study both query types with a melody-only retrieval system: a key-normalized pitch track (F0) embedded by a 5.2M-parameter contour encoder, with a spectral-peak tracker for whistles. We make three contributions. First, a physics-grounded synthetic query generator that renders whistles (a near-sinusoid with a weak second harmonic, placed in the human whistle register) and nonsense-syllable singing (a source-filter voice) from the vocal melodies of 11,083 songs, then re-tracks each rendering with the tracker a real query would get. Second, a controlled study over three training rounds. Training on these queries raises top-1 retrieval of held-out synthetic queries against an 11,050-song gallery from 0.180 to 0.251 for whistles and from 0.193 to 0.264 for wrong-lyrics singing, at a hum cost of under one point. The gain does not transfer to real whistles: on the MLEnd test performers the best synthetic-only model gets 210 of 339 whistles right at top-1, against 214 for the baseline. Adding real whistles of 6 of the 8 test tunes to training helps those tunes and drops the 2 held-out tunes from 53 to 41 of 90, and a saturated selection metric silently returned the starting weights in the first round. Third, a closed-set real-whistle fine-tune on MLEnd's 8 songs with performer-disjoint splits raises whistle→hum top-1 from 0.631 (E2b zero-shot; clip 95% CI [0.581, 0.681]) to 0.673 with all train performers (CI [0.622, 0.723]); this is closed-set on known songs, not open-set generalization. We then test two further generations of synthetic queries. A commercial neural music model conditioned on separated song vocals renders melody-faithful whistles and la-la singing (180 clips); fine-tuning on them leaves real-whistle top-1 at 0.631. An open-source pipeline (YingMusic-Singer-Plus sung queries with partly wrong, mumbled or nonsense lyrics, a DDSP whistle synthesizer, and a melody-error model fitted on real MLEnd training performers) produces about 2,000 queries over 167 songs; no fine-tune beats the baseline on real-whistle top-1 (best 0.619, paired difference -0.012, 95% CI [-0.038, +0.015]), and full training on the mixed data costs about 9 points. Across three generations of synthetic data (physics-based, commercial neural, and open-source neural with learned human errors), nothing transferred to real whistles. This points to collecting real queries as the missing step. Code is public; models and data will be released.

1 Introduction

You probably know the feeling: a song has been stuck in your head all day, you know exactly how it goes, but you cannot remember what it is called, and when you hum it to a friend they look at you as if you have lost your mind. A tune that loops in your head like this is called an earworm. Music recognition apps such as Shazam cannot help, because they need the recording itself to be playing, and the whole problem is that it is not. This paper is an attempt at a Shazam for exactly that situation, when all you have is the tune in your head.

Often you do not even know the words. You whistle it, or sing it with whatever words come to mind. The retrieval problem is the same each time: find the recording whose melody matches the query's melody, whatever the timbre, words, key and tempo.

Google’s Hum to Search reports that a model trained mostly on sung clips “worked well enough for people singing, but not for people humming or whistling” [7]. The open query-by-humming (QbH) literature, including CHAD [1] and ByteHum [5], evaluates hummed and sung queries, not whistles. We found no public dataset of whistled or wrong-lyrics queries paired with the song recordings.

Why whistles are hard. A whistle is a different sound source from the voice (Section 3): it is close to a pure tone and sits about three octaves above a hum. A vocal pitch model can report it an octave low, and people whistle a compressed version of the tune.

Why wrong lyrics matter. A spectrogram model can learn to use lyrics and timbre, which a wrong-lyrics query does not share with the recording. A melody-only model cannot use them by design. What stays hard is that made-up words change the voiced/unvoiced pattern and add consonant breaks that a pitch tracker turns into gaps and glitches.

References (19)