Here is a simple melody that will help you hear diminished as diminished, not merely as a dominant 7(b9). This is fairly easy idea that is played through the keys around the circle of fourths starting in concert C. It’s good to recognize that diminished (whole, half) is actually much harder to hear (and sing) than dominant 7th (b9) partially do to the lack of a stabilizing 5th above the root. As an exercise, try to sing a diminished scale over a pedal or drone starting with a half step (half, whole), because of the perfect 5th, the scale is much more stable and easier to sing and hear. Next try to sing the scale over a pedal or drone starting with a whole step… you’ll see that as the scale moves from the #11 to the #5 (without the presence of the perfect 5th above the root), it’s much harder to sing and get in tune, and thus much harder to hear accurately. In general scales without a perfect 5th are the hardest to sing over their appropriate root.